This commit is contained in:
Syntriax 2023-12-06 17:47:38 +03:00
parent 03ba4878c0
commit add4783c73
1 changed files with 7 additions and 7 deletions

View File

@ -68,13 +68,13 @@ public class Game1 : Game
gameObjectBall.BehaviourController.AddBehaviour<DisplayableSpriteBehaviour>().Assign(spriteBall);
gameObjectBall.BehaviourController.AddBehaviour<Collider2DAABBBehaviour>().AABBLocal = new AABB(-Vector2.One * 512f * .5f, Vector2.One * 512f * .5f);
gameObjectBall = gameManager.InstantiateGameObject<GameObject>();
gameObjectBall.Name = "Ball";
gameObjectBall.Transform.Position = Vector2.UnitY * 30f;
gameObjectBall.Transform.Scale = new Vector2(1f / 51.2f, 1f / 51.2f);
engine.AddRigidBody(gameObjectBall.BehaviourController.AddBehaviour<RigidBody2D>());
gameObjectBall.BehaviourController.AddBehaviour<MovementBallBehaviour>(new Vector2(.1f, .01f), 500f);
gameObjectBall.BehaviourController.AddBehaviour<DisplayableSpriteBehaviour>().Assign(spriteBall);
gameObjectBall.BehaviourController.AddBehaviour<Collider2DAABBBehaviour>().AABBLocal = new AABB(-Vector2.One * 512f * .5f, Vector2.One * 512f * .5f);
// gameObjectBall.Name = "Ball";
// gameObjectBall.Transform.Position = Vector2.UnitY * 30f;
// gameObjectBall.Transform.Scale = new Vector2(1f / 51.2f, 1f / 51.2f);
// engine.AddRigidBody(gameObjectBall.BehaviourController.AddBehaviour<RigidBody2D>());
// gameObjectBall.BehaviourController.AddBehaviour<MovementBallBehaviour>(new Vector2(.1f, .01f), 500f);
// gameObjectBall.BehaviourController.AddBehaviour<DisplayableSpriteBehaviour>().Assign(spriteBall);
// gameObjectBall.BehaviourController.AddBehaviour<Collider2DAABBBehaviour>().AABBLocal = new AABB(-Vector2.One * 512f * .5f, Vector2.One * 512f * .5f);
IGameObject gameObjectLeft = gameManager.InstantiateGameObject<GameObject>();
gameObjectLeft.Name = "Left";