style: Moved Play Area Boxes Further Out
This commit is contained in:
parent
45df32dabb
commit
a7e8787579
|
@ -112,8 +112,8 @@ public class Game1 : Game
|
||||||
|
|
||||||
IGameObject gameObjectWallTop = gameManager.InstantiateGameObject<GameObject>();
|
IGameObject gameObjectWallTop = gameManager.InstantiateGameObject<GameObject>();
|
||||||
gameObjectWallTop.Name = "WallTop";
|
gameObjectWallTop.Name = "WallTop";
|
||||||
gameObjectWallTop.Transform.Position = new Vector2D(0f, 298f);
|
gameObjectWallTop.Transform.Position = new Vector2D(0f, 308f);
|
||||||
gameObjectWallTop.Transform.Scale = new Vector2D(542f, 20f);
|
gameObjectWallTop.Transform.Scale = new Vector2D(552f, 20f);
|
||||||
gameObjectWallTop.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
gameObjectWallTop.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
||||||
RigidBody2D rigidBodyWallTop = gameObjectWallTop.BehaviourController.AddBehaviour<RigidBody2D>();
|
RigidBody2D rigidBodyWallTop = gameObjectWallTop.BehaviourController.AddBehaviour<RigidBody2D>();
|
||||||
rigidBodyWallTop.IsStatic = true;
|
rigidBodyWallTop.IsStatic = true;
|
||||||
|
@ -121,8 +121,8 @@ public class Game1 : Game
|
||||||
|
|
||||||
IGameObject gameObjectWallBottom = gameManager.InstantiateGameObject<GameObject>();
|
IGameObject gameObjectWallBottom = gameManager.InstantiateGameObject<GameObject>();
|
||||||
gameObjectWallBottom.Name = "WallBottom";
|
gameObjectWallBottom.Name = "WallBottom";
|
||||||
gameObjectWallBottom.Transform.Position = new Vector2D(0f, -298f);
|
gameObjectWallBottom.Transform.Position = new Vector2D(0f, -308f);
|
||||||
gameObjectWallBottom.Transform.Scale = new Vector2D(542f, 20f);
|
gameObjectWallBottom.Transform.Scale = new Vector2D(552f, 20f);
|
||||||
gameObjectWallBottom.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
gameObjectWallBottom.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
||||||
RigidBody2D rigidBodyWallBottom = gameObjectWallBottom.BehaviourController.AddBehaviour<RigidBody2D>();
|
RigidBody2D rigidBodyWallBottom = gameObjectWallBottom.BehaviourController.AddBehaviour<RigidBody2D>();
|
||||||
rigidBodyWallBottom.IsStatic = true;
|
rigidBodyWallBottom.IsStatic = true;
|
||||||
|
@ -130,8 +130,8 @@ public class Game1 : Game
|
||||||
|
|
||||||
IGameObject gameObjectWallRight = gameManager.InstantiateGameObject<GameObject>();
|
IGameObject gameObjectWallRight = gameManager.InstantiateGameObject<GameObject>();
|
||||||
gameObjectWallRight.Name = "WallRight";
|
gameObjectWallRight.Name = "WallRight";
|
||||||
gameObjectWallRight.Transform.Position = new Vector2D(522f, 0f);
|
gameObjectWallRight.Transform.Position = new Vector2D(532f, 0f);
|
||||||
gameObjectWallRight.Transform.Scale = new Vector2D(20f, 318f);
|
gameObjectWallRight.Transform.Scale = new Vector2D(20f, 328f);
|
||||||
gameObjectWallRight.BehaviourController.AddBehaviour<ScoreBoundary>((Action)pongScoreboard.ScoreToLeft);
|
gameObjectWallRight.BehaviourController.AddBehaviour<ScoreBoundary>((Action)pongScoreboard.ScoreToLeft);
|
||||||
gameObjectWallRight.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
gameObjectWallRight.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
||||||
RigidBody2D rigidBodyWallRight = gameObjectWallRight.BehaviourController.AddBehaviour<RigidBody2D>();
|
RigidBody2D rigidBodyWallRight = gameObjectWallRight.BehaviourController.AddBehaviour<RigidBody2D>();
|
||||||
|
@ -140,8 +140,8 @@ public class Game1 : Game
|
||||||
|
|
||||||
IGameObject gameObjectWallLeft = gameManager.InstantiateGameObject<GameObject>();
|
IGameObject gameObjectWallLeft = gameManager.InstantiateGameObject<GameObject>();
|
||||||
gameObjectWallLeft.Name = "WallLeft";
|
gameObjectWallLeft.Name = "WallLeft";
|
||||||
gameObjectWallLeft.Transform.Position = new Vector2D(-522f, 0f);
|
gameObjectWallLeft.Transform.Position = new Vector2D(-532f, 0f);
|
||||||
gameObjectWallLeft.Transform.Scale = new Vector2D(20f, 318f);
|
gameObjectWallLeft.Transform.Scale = new Vector2D(20f, 328f);
|
||||||
gameObjectWallLeft.BehaviourController.AddBehaviour<ScoreBoundary>((Action)pongScoreboard.ScoreToRight);
|
gameObjectWallLeft.BehaviourController.AddBehaviour<ScoreBoundary>((Action)pongScoreboard.ScoreToRight);
|
||||||
gameObjectWallLeft.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
gameObjectWallLeft.BehaviourController.AddBehaviour<ShapeBehaviour>(Shape.Box);
|
||||||
RigidBody2D rigidBodyWallLeft = gameObjectWallLeft.BehaviourController.AddBehaviour<RigidBody2D>();
|
RigidBody2D rigidBodyWallLeft = gameObjectWallLeft.BehaviourController.AddBehaviour<RigidBody2D>();
|
||||||
|
@ -149,8 +149,7 @@ public class Game1 : Game
|
||||||
engine.AddRigidBody(rigidBodyWallLeft);
|
engine.AddRigidBody(rigidBodyWallLeft);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////
|
||||||
///
|
|
||||||
///
|
|
||||||
IGameObject gameObjectLeftScoreText = gameManager.InstantiateGameObject<GameObject>();
|
IGameObject gameObjectLeftScoreText = gameManager.InstantiateGameObject<GameObject>();
|
||||||
gameObjectLeftScoreText.Name = "Score Left";
|
gameObjectLeftScoreText.Name = "Score Left";
|
||||||
gameObjectLeftScoreText.Transform.Position = new Vector2D(-250f, 250f);
|
gameObjectLeftScoreText.Transform.Position = new Vector2D(-250f, 250f);
|
||||||
|
|
Loading…
Reference in New Issue