//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {Contact : darkwynter.com for licensing information //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace DarkWynter.EventSystem.EventTypes { using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Xml; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; /// /// Instance of a AIEvent /// Extends GameEvent /// Used to setPosition for AI to walk to (straight line) /// public class AIEvent : GameEvent { /// /// Destinations.X coordinate /// public int destX { get { return _destX; } set { _destX = value; } } private int _destX; /// /// Destinations.Y coordinate /// public int destY { get { return _destY; } set { _destY = value; } } private int _destY; /// /// Destinations.Z coordinate /// public int destZ { get { return _destZ; } set { _destZ = value; } } private int _destZ; Vector3 AIDestination; /// /// Creates the AIEvent from XML /// Has a model to draw for LevelEditing /// /// XML Node public AIEvent(XmlNode node) : base(node) { // AI Waypoint In-Order Indexing this._trigger_ID = int.Parse(node.Attributes["ID"].Value); this.destX = int.Parse(node.Attributes["destX"].Value); this.destY = int.Parse(node.Attributes["destY"].Value); this.destZ = int.Parse(node.Attributes["destZ"].Value); AIDestination.X = destX; AIDestination.Y = destY; AIDestination.Z = destZ; } /// /// Fires the Event based on matching the Event Conditions to the SBE /// public override void FireEvent() { // Go to the AI class and handle from there... //GameObject thought = DarkWynterEngine.objectLibrary.gameObjectList[0]; //thought.destination = AIDestination; //thought.destinationReached = false; //isFinished = true; } } }