From 4ae9578123ea5b2434dbead7ab37dfc244e987d8 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Tue, 23 Jan 2024 12:18:41 +0300 Subject: [PATCH] chore: Enabled Walls --- Game/Game1.cs | 8 ++++---- Game/Physics2D/PhysicsEngine2D.cs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Game/Game1.cs b/Game/Game1.cs index 0144dc0..5056882 100644 --- a/Game/Game1.cs +++ b/Game/Game1.cs @@ -104,26 +104,26 @@ public class Game1 : Game goPlayAreaTop.Transform.Position = new Vector2D(0f, 288f + 20f); goPlayAreaTop.Transform.Scale = new Vector2D(10240f, 40f); goPlayAreaTop.BehaviourController.AddBehaviour().Assign(spriteBox); - // goPlayAreaTop.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); + goPlayAreaTop.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); engine.AddRigidBody(goPlayAreaTop.BehaviourController.AddBehaviour()); IGameObject goPlayAreaBottom = gameManager.InstantiateGameObject(); goPlayAreaBottom.Transform.Position = new Vector2D(0f, -(288f + 20f)); goPlayAreaBottom.Transform.Scale = new Vector2D(10240f, 40f); goPlayAreaBottom.BehaviourController.AddBehaviour().Assign(spriteBox); - // goPlayAreaBottom.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); + goPlayAreaBottom.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); engine.AddRigidBody(goPlayAreaBottom.BehaviourController.AddBehaviour()); IGameObject goPlayAreaRight = gameManager.InstantiateGameObject(); goPlayAreaRight.Transform.Position = new Vector2D(512f + 20f, 0f); goPlayAreaRight.Transform.Scale = new Vector2D(40f, 5760f); goPlayAreaRight.BehaviourController.AddBehaviour().Assign(spriteBox); - // goPlayAreaRight.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); + goPlayAreaRight.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); engine.AddRigidBody(goPlayAreaRight.BehaviourController.AddBehaviour()); IGameObject goPlayAreaLeft = gameManager.InstantiateGameObject(); goPlayAreaLeft.Transform.Position = new Vector2D(-(512f + 20f), 0f); goPlayAreaLeft.Transform.Scale = new Vector2D(40f, 5760f); goPlayAreaLeft.BehaviourController.AddBehaviour().Assign(spriteBox); - // goPlayAreaLeft.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); + goPlayAreaLeft.BehaviourController.AddBehaviour().AABBLocal = new AABB(-Vector2D.One * .5f, Vector2D.One * .5f); engine.AddRigidBody(goPlayAreaLeft.BehaviourController.AddBehaviour()); // IGameObject goPlayAreaCenter = gameManager.InstantiateGameObject(); diff --git a/Game/Physics2D/PhysicsEngine2D.cs b/Game/Physics2D/PhysicsEngine2D.cs index 4c0bb66..6758039 100644 --- a/Game/Physics2D/PhysicsEngine2D.cs +++ b/Game/Physics2D/PhysicsEngine2D.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -using Microsoft.Xna.Framework; using Syntriax.Engine.Core; using Syntriax.Engine.Core.Abstract; using Syntriax.Engine.Physics2D.Abstract;