diff --git a/DepthsBelow/DepthsBelow/Component/Stat.cs b/DepthsBelow/DepthsBelow/Component/Stat.cs
index ee5e230..e4cfd17 100755
--- a/DepthsBelow/DepthsBelow/Component/Stat.cs
+++ b/DepthsBelow/DepthsBelow/Component/Stat.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Microsoft.Xna.Framework;
namespace DepthsBelow.Component
{
@@ -39,7 +40,15 @@ namespace DepthsBelow.Component
protected int ammo = 0;
protected int enemyDodge = 0;
- protected int penaltyRange = 5;
+ protected int penaltyRange = 5;
+
+ Vector2 rememberedPosition = Vector2.Zero;
+
+ public Vector2 Remember
+ {
+ get { return rememberedPosition; }
+ set { rememberedPosition = value; }
+ }
public int GetAim
{
@@ -83,7 +92,8 @@ namespace DepthsBelow.Component
public void Kill()
{
- hp = 0;
+ hp = 0;
+ Parent.Remove();
//Console.WriteLine("Blargh! I am dead!");
}
@@ -94,8 +104,8 @@ namespace DepthsBelow.Component
public Stat(Entity parent)
: base (parent)
- {
-
+ {
+ rememberedPosition = Vector2.Zero;
}
public bool targetInSight()
diff --git a/DepthsBelow/DepthsBelow/Core.cs b/DepthsBelow/DepthsBelow/Core.cs
index 237359a..6a0420e 100755
--- a/DepthsBelow/DepthsBelow/Core.cs
+++ b/DepthsBelow/DepthsBelow/Core.cs
@@ -1,250 +1,250 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using DepthsBelow.GUI;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Audio;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.GamerServices;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-using Microsoft.Xna.Framework.Media;
-
-namespace DepthsBelow
-{
- ///
- /// This is the main type for your game
- ///
- public class Core : Microsoft.Xna.Framework.Game
- {
- public static GraphicsDeviceManager GraphicsDeviceManager;
- private SpriteBatch spriteBatch;
- private Effect lightShader;
- private RenderTarget2D lightRenderTarget;
- private RenderTarget2D sceneRenderTarget;
-
- public Lua Lua;
-
- public EntityManager EntityManager;
- public TurnManager TurnManager;
-
- public Camera Camera;
- public Interface Interface;
-
- public static MouseInput MouseInput;
- public static KeyboardInput KeyboardInput;
- public List Squad;
- public DynamicGroupManager GroupManager;
- public List Swarm;
- public List Volley;
-
- public List Spawn;
-
- public static Map Map;
-
- public SmallEnemy TestMonster;
-
- public int Brightness = 30;
-
- public Core()
- {
- GraphicsDeviceManager = new GraphicsDeviceManager(this);
- GraphicsDeviceManager.PreferredBackBufferWidth = 1280;
- GraphicsDeviceManager.PreferredBackBufferHeight = 720;
- GraphicsDeviceManager.IsFullScreen = false;
- //graphics.SynchronizeWithVerticalRetrace = false;
- GraphicsDeviceManager.ApplyChanges();
-
- this.IsFixedTimeStep = false;
- this.IsMouseVisible = true;
-
- Content.RootDirectory = "Content";
- }
-
- ///
- /// Allows the game to perform any initialization it needs to before starting to run.
- /// This is where it can query for any required services and load any non-graphic
- /// related content. Calling base.Initialize will enumerate through any components
- /// and initialize them as well.
- ///
- protected override void Initialize()
- {
- GameServices.AddService(GraphicsDevice);
- GameServices.AddService(Content);
-
- Lua = new Lua();
-
- EntityManager = new EntityManager();
- TurnManager = new TurnManager(new string[] { "Player", "Computer" });
-
- Camera = new Camera(this);
- Interface = new Interface(this);
-
- Squad = new List();
- Swarm = new List();
- Volley = new List();
-
- Spawn = new List();
-
- base.Initialize();
- }
-
- ///
- /// LoadContent will be called once per game and is the place to load
- /// all of your content.
- ///
- protected override void LoadContent()
- {
- // Create a new SpriteBatch, which can be used to draw textures.
- spriteBatch = new SpriteBatch(GraphicsDevice);
- lightShader = Content.Load("shaders/LightEffect");
- lightRenderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents);
- sceneRenderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
-
- Map = Content.Load