Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Huvier committed Aug 16, 2023
1 parent c6f32e9 commit e9de198
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Testing/MyScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@ public MyScene()
var e = new Entity();
e.AddComponent(new TransformComponent(new Vec2(100)));
e.AddComponent(new RectComponent(Color.Black, new Vec2(50)));
e.AddComponent(new ControlComponent());
e.AddComponent(new ControlComponent(speed: 200, useGamePad: true, gamePadIndex: 0));
e.AddComponent(new CollisionComponent(new Vec2(50)));
AddEntity(e);

var e2 = new Entity();
e2.AddComponent(new TransformComponent(new Vec2(300)));
e2.AddComponent(new RectComponent(Color.Red, new Vec2(50)));
e2.AddComponent(new CollisionComponent(new Vec2(50), Vec2.Zero, false, CollisionCallback));
e2.AddComponent(new CollisionComponent(new Vec2(50)));
AddEntity(e2);
}

private void CollisionCallback(Entity from, Entity other)
{
DebugManager.Log(LogLevel.LogInfo, $"Collision !");
}
}

0 comments on commit e9de198

Please sign in to comment.