//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {Contact : darkwynter.com for licensing information //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace DarkWynter.Game.GameObjects { #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Xml; using System.Diagnostics; using System.Threading; using DarkWynter.Game.Globals; using DarkWynter.Engine; using DarkWynter.Engine.Globals; using DarkWynter.Engine.ObjectLib; using DarkWynter.Engine.GameObjects; using DarkWynter.Engine.Controllers; using DarkWynter.Engine.UserInterface; using DarkWynter.Stream; using DarkWynter.Engine.Init; using Xclna.Xna.Animation; #endregion public class ThoughtsAI : AI { /// /// Constructor /// /// public Vector3 whereAreYou = new Vector3(); //public Vector3 setDestination = new Vector3(); public ThoughtsAI(Load gameObjectLoader) : base(gameObjectLoader) { this.mass.movementType = Enums_Engine.MovementType.WALK; } public override void Update(ref ObjectLibrary objectLibrary) { // setDestination = Statics_Game.GameSettings.BombCurrentPosition; //if (setDestination != null) //{ // mass.AddForce(new Vector3 (5, 0, 5)); // // cap the y at zero so they can't get above the H2O plane //mass.currentPosition.Y = 125.0f; //} // If dead they can't update if (IsAlive() == false) { return; } // Reset all controller inputs //DarkWynterGame.playerController.gameInput.init(); // Turn terrain mod back off terrainModEnabled = false; // Fuzzy state machine // * <- means smarter choice // Update percepts // UpdatePercepts(objectLibrary); //UpdateState(objectLibrary); //attackAmount = shootAmount + defendAmount; Statics_Game.GameSettings.whereAreYou = mass.currentPosition; base.Update(ref objectLibrary); //} } public override void Draw_Billboards(ObjectLibrary objectLibrary, BillboardList gameObjectBillboards) { base.Draw_Billboards(objectLibrary, gameObjectBillboards); Texture2D billboardImage = Statics_Engine.SystemSettings.content.Load("Content/_textures/bomb1"); List billboards = new List(); Vector3 offset = mass.currentPosition; //offset.Y += 50; Billboard billboard = new Billboard(null); billboard.Load(mass.currentPosition + offset, Vector3.Zero, 50.0f, 50.0f, draw.textureList[0]); //billboard.Load(mass.currentPosition + offset, Vector3.Zero, 15.0f, 15.0f, Engine.DarkWynterEngine.video.CurrentTexture); billboards.Add(billboard); // Add a billboard texture above the particle gameObjectBillboards.Add(billboards); } } }