chore: Don't Ask #2

This commit is contained in:
Syntriax 2023-11-24 23:38:08 +03:00
parent a2da54172e
commit 4443e5d1c4
1 changed files with 6 additions and 4 deletions

View File

@ -39,14 +39,17 @@ public class Game1 : Game
{
_spriteBatch = new SpriteBatch(GraphicsDevice);
Sprite sprite = new Sprite() { Texture2D = Content.Load<Texture2D>("Sprites/Pixel") };
Texture2D texture2D = Content.Load<Texture2D>("Sprites/Pixel");
Sprite spriteRight = new Sprite() { Texture2D = texture2D, Color = Color.Gold };
Sprite spriteLeft = new Sprite() { Texture2D = texture2D, Color = Color.AliceBlue };
gameObjectLeft = gameManager.InstantiateGameObject<GameObject>();
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<KeyboardInputsBehaviour>();
gameObjectLeft.BehaviourController.AddBehaviour<MovementBehaviour>(Keys.S, Keys.W, 200f);
gameObjectLeft.BehaviourController.AddBehaviour<DrawableSpriteBehaviour>().Assign(sprite);
gameObjectLeft.BehaviourController.AddBehaviour<DrawableSpriteBehaviour>().Assign(spriteLeft);
gameObjectRight = gameManager.InstantiateGameObject<GameObject>();
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<KeyboardInputsBehaviour>();
gameObjectRight.BehaviourController.AddBehaviour<MovementBehaviour>(Keys.Down, Keys.Up, 200f);
gameObjectRight.BehaviourController.AddBehaviour<DrawableSpriteBehaviour>().Assign(sprite);
gameObjectRight.BehaviourController.AddBehaviour<DrawableSpriteBehaviour>().Assign(spriteRight);
// TODO: use this.Content to load your game content here
}