diff --git a/Engine b/Engine index dbb263e..2f043c1 160000 --- a/Engine +++ b/Engine @@ -1 +1 @@ -Subproject commit dbb263ebed24a1658d5d18d27182c8749cc8ee06 +Subproject commit 2f043c19a6a281f56bbf9ce22a3dd033cce0a2fe diff --git a/Game/GamePong.cs b/Game/GamePong.cs index 126a263..2648f0d 100644 --- a/Game/GamePong.cs +++ b/Game/GamePong.cs @@ -67,19 +67,19 @@ public class GamePong : Game //////////////////////////////////////////////////////////////////////////////////// - IGameObject gameObjectCamera = gameManager.InstantiateGameObject().SetGameObject("Camera"); ; + IGameObject gameObjectCamera = gameManager.InstantiateGameObject().SetGameObject("Camera"); ; gameObjectCamera.BehaviourController.AddBehaviour(); cameraBehaviour = gameObjectCamera.BehaviourController.AddBehaviour(graphics); //////////////////////////////////////////////////////////////////////////////////// - IGameObject gameObjectPongManager = gameManager.InstantiateGameObject().SetGameObject("Pong Game Manager"); + IGameObject gameObjectPongManager = gameManager.InstantiateGameObject().SetGameObject("Pong Game Manager"); pongManager = gameObjectPongManager.BehaviourController.AddBehaviour(5); pongManager.Id = "pongManager"; //////////////////////////////////////////////////////////////////////////////////// - IGameObject gameObjectBall = gameManager.InstantiateGameObject().SetGameObject("Ball"); + IGameObject gameObjectBall = gameManager.InstantiateGameObject().SetGameObject("Ball"); gameObjectBall.Transform.SetTransform(position: new Vector2D(0, 0f), scale: new Vector2D(10f, 10f)); gameObjectBall.BehaviourController.AddBehaviour(new Circle(Vector2D.Zero, 1f)); @@ -88,14 +88,14 @@ public class GamePong : Game //////////////////////////////////////////////////////////////////////////////////// - IGameObject gameObjectLeftPaddle = gameManager.InstantiateGameObject().SetGameObject("Left Paddle"); + IGameObject gameObjectLeftPaddle = gameManager.InstantiateGameObject().SetGameObject("Left Paddle"); gameObjectLeftPaddle.Transform.SetTransform(position: new Vector2D(-468f, 0f), scale: new Vector2D(15f, 60f)); gameObjectLeftPaddle.BehaviourController.AddBehaviour(Keys.W, Keys.S, 228f, -228f, 400f).Id = "leftPaddle"; ; gameObjectLeftPaddle.BehaviourController.AddBehaviour(Shape.Box); gameObjectLeftPaddle.BehaviourController.AddBehaviour().IsStatic = true; - IGameObject gameObjectRightPaddle = gameManager.InstantiateGameObject().SetGameObject("Right Paddle"); + IGameObject gameObjectRightPaddle = gameManager.InstantiateGameObject().SetGameObject("Right Paddle"); gameObjectRightPaddle.Transform.SetTransform(position: new Vector2D(468f, 0f), scale: new Vector2D(15f, 60f)); gameObjectRightPaddle.BehaviourController.AddBehaviour(Keys.Up, Keys.Down, 228f, -228f, 400f).Id = "rightPaddle"; ; gameObjectRightPaddle.BehaviourController.AddBehaviour(Shape.Box); @@ -103,23 +103,23 @@ public class GamePong : Game //////////////////////////////////////////////////////////////////////////////////// - IGameObject gameObjectWallTop = gameManager.InstantiateGameObject().SetGameObject("Wall Top"); + IGameObject gameObjectWallTop = gameManager.InstantiateGameObject().SetGameObject("Wall Top"); gameObjectWallTop.Transform.SetTransform(position: new Vector2D(0f, 308f), scale: new Vector2D(552f, 20f)); gameObjectWallTop.BehaviourController.AddBehaviour(Shape.Box); gameObjectWallTop.BehaviourController.AddBehaviour().IsStatic = true; - IGameObject gameObjectWallBottom = gameManager.InstantiateGameObject().SetGameObject("Wall Bottom"); + IGameObject gameObjectWallBottom = gameManager.InstantiateGameObject().SetGameObject("Wall Bottom"); gameObjectWallBottom.Transform.SetTransform(position: new Vector2D(0f, -308f), scale: new Vector2D(552f, 20f)); gameObjectWallBottom.BehaviourController.AddBehaviour(Shape.Box); gameObjectWallBottom.BehaviourController.AddBehaviour().IsStatic = true; - IGameObject gameObjectWallRight = gameManager.InstantiateGameObject().SetGameObject("Wall Right"); + IGameObject gameObjectWallRight = gameManager.InstantiateGameObject().SetGameObject("Wall Right"); gameObjectWallRight.Transform.SetTransform(position: new Vector2D(532f, 0f), scale: new Vector2D(20f, 328f)); gameObjectWallRight.BehaviourController.AddBehaviour((Action)pongManager.ScoreToLeft); gameObjectWallRight.BehaviourController.AddBehaviour(Shape.Box); gameObjectWallRight.BehaviourController.AddBehaviour().IsStatic = true; - IGameObject gameObjectWallLeft = gameManager.InstantiateGameObject().SetGameObject("Wall Left"); + IGameObject gameObjectWallLeft = gameManager.InstantiateGameObject().SetGameObject("Wall Left"); gameObjectWallLeft.Transform.SetTransform(position: new Vector2D(-532f, 0f), scale: new Vector2D(20f, 328f)); gameObjectWallLeft.BehaviourController.AddBehaviour((Action)pongManager.ScoreToRight); gameObjectWallLeft.BehaviourController.AddBehaviour(Shape.Box); @@ -127,11 +127,11 @@ public class GamePong : Game //////////////////////////////////////////////////////////////////////////////////// - IGameObject gameObjectLeftScoreText = gameManager.InstantiateGameObject().SetGameObject("Score Left"); + IGameObject gameObjectLeftScoreText = gameManager.InstantiateGameObject().SetGameObject("Score Left"); gameObjectLeftScoreText.Transform.SetTransform(position: new Vector2D(-250f, 250f), scale: Vector2D.One * .25f); gameObjectLeftScoreText.BehaviourController.AddBehaviour(true, spriteFont); - IGameObject gameObjectRightScoreText = gameManager.InstantiateGameObject().SetGameObject("Score Right"); + IGameObject gameObjectRightScoreText = gameManager.InstantiateGameObject().SetGameObject("Score Right"); gameObjectRightScoreText.Transform.SetTransform(position: new Vector2D(250f, 250f), scale: Vector2D.One * .25f); gameObjectRightScoreText.BehaviourController.AddBehaviour(false, spriteFont);