diff --git a/Game/Game1.cs b/Game/Game1.cs index 4e0dd45..e7ad6d7 100644 --- a/Game/Game1.cs +++ b/Game/Game1.cs @@ -39,14 +39,17 @@ public class Game1 : Game { _spriteBatch = new SpriteBatch(GraphicsDevice); - Sprite sprite = new Sprite() { Texture2D = Content.Load("Sprites/Pixel") }; + Texture2D texture2D = Content.Load("Sprites/Pixel"); + Sprite spriteRight = new Sprite() { Texture2D = texture2D, Color = Color.Gold }; + Sprite spriteLeft = new Sprite() { Texture2D = texture2D, Color = Color.AliceBlue }; + gameObjectLeft = gameManager.InstantiateGameObject(); gameObjectLeft.Name = "Left"; gameObjectLeft.Transform.Position = new Vector2(Window.ClientBounds.Width * .1f, Window.ClientBounds.Height * .5f); gameObjectLeft.Transform.Scale = new Vector2(Window.ClientBounds.Width * .02f, Window.ClientBounds.Height * .15f); gameObjectLeft.BehaviourController.AddBehaviour(); gameObjectLeft.BehaviourController.AddBehaviour(Keys.S, Keys.W, 200f); - gameObjectLeft.BehaviourController.AddBehaviour().Assign(sprite); + gameObjectLeft.BehaviourController.AddBehaviour().Assign(spriteLeft); gameObjectRight = gameManager.InstantiateGameObject(); gameObjectRight.Name = "Right"; @@ -54,8 +57,7 @@ public class Game1 : Game gameObjectRight.Transform.Scale = new Vector2(Window.ClientBounds.Width * .02f, Window.ClientBounds.Height * .15f); gameObjectRight.BehaviourController.AddBehaviour(); gameObjectRight.BehaviourController.AddBehaviour(Keys.Down, Keys.Up, 200f); - gameObjectRight.BehaviourController.AddBehaviour().Assign(sprite); - + gameObjectRight.BehaviourController.AddBehaviour().Assign(spriteRight); // TODO: use this.Content to load your game content here }