diff --git a/Game/Game1.cs b/Game/Game1.cs index 48b064c..af2b4b5 100644 --- a/Game/Game1.cs +++ b/Game/Game1.cs @@ -37,8 +37,14 @@ public class Game1 : Game { _spriteBatch = new SpriteBatch(GraphicsDevice); - Texture2D texture2D = Content.Load("Sprites/Pixel"); - Sprite sprite = new Sprite() { Texture2D = texture2D }; + Sprite spriteBox = new Sprite() { Texture2D = Content.Load("Sprites/Pixel") }; + Sprite spriteBall = new Sprite() { Texture2D = Content.Load("Sprites/Circle") }; + + IGameObject gameObjectBall = gameManager.InstantiateGameObject(); + gameObjectBall.Name = "Ball"; + gameObjectBall.Transform.Position = new Vector2(Window.ClientBounds.Width * .5f, Window.ClientBounds.Height * .5f); + gameObjectBall.Transform.Scale = new Vector2(.025f, .025f); + gameObjectBall.BehaviourController.AddBehaviour().Assign(spriteBall); IGameObject gameObjectLeft = gameManager.InstantiateGameObject(); gameObjectLeft.Name = "Left"; @@ -46,7 +52,7 @@ public class Game1 : Game 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(spriteBox); IGameObject gameObjectRight = gameManager.InstantiateGameObject(); gameObjectRight.Name = "Right"; @@ -54,7 +60,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(spriteBox); // TODO: use this.Content to load your game content here }