Base Entity keeps track of core

This commit is contained in:
Simon Holmberg
2012-09-27 19:30:35 +02:00
parent 832ef9d850
commit 39eaa15b50
2 changed files with 5 additions and 5 deletions
+4 -1
View File
@@ -11,9 +11,12 @@ namespace DepthsBelow
List<Component.Component> Components;
public Component.PixelTransform pixelTransform;
public Component.GridTransform gridTransform;
private Core core;
public Entity()
public Entity(Core core)
{
this.core = core;
Components = new List<Component.Component>();
pixelTransform = new Component.PixelTransform(this);
AddComponent(pixelTransform);
+1 -4
View File
@@ -11,14 +11,11 @@ namespace DepthsBelow
public static Texture2D Texture;
public static Point Origin;
private bool _selected;
private Core game;
private KeyboardState lastKeyboardState;
public Soldier(Core game)
public Soldier(Core core) : base(core)
{
this.game = game;
if (Texture == null)
LoadContent(game);