Invoke on collision enter + start of attach child colliders to rigidbody

+ Changed default Namespace of ScriptCore to GlitchyEngine
+ Implicit Casts float2 <-> b2Vec2
+ Entity constructor internal
+ Renamed RigidBody2D to Rigidbody2D (notice the B)
+ Basic Debug Draw actual 2D Colliders
+ Added Entity::GetParentWithComponent
This commit is contained in:
Simon Lübeß
2023-08-10 19:55:45 +02:00
parent 987246a806
commit aafcc41286
13 changed files with 373 additions and 40 deletions
+1 -1
View File
@@ -405,7 +405,7 @@ namespace GlitchyEditor
for (var (entity, transform, collider) in _activeScene.GetEntities<TransformComponent, BoxCollider2DComponent>())
{
Renderer2D.DrawRect(transform.WorldTransform * Matrix.Translation(collider.Offset.X, collider.Offset.Y, 0) * Matrix.Scaling(collider.Size.X * 2, collider.Size.Y * 2, 0));
Renderer2D.DrawRect(transform.WorldTransform * Matrix.Translation(collider.Offset.X, collider.Offset.Y, 0) * Matrix.Scaling(collider.Size.X * 2, collider.Size.Y * 2, 0), .Green);
}
for (var (entity, transform, collider) in _activeScene.GetEntities<TransformComponent, CircleCollider2DComponent>())