Added Entity event OnCollisionEnter2D

This commit is contained in:
Simon Lübeß
2025-08-08 19:09:34 +02:00
parent bf03e99e4a
commit 74243cd285
5 changed files with 35 additions and 2 deletions
+7 -1
View File
@@ -14,7 +14,7 @@ namespace GlitchyEngine;
/// <summary>
/// The base class for all entities and scripts in the current world.
/// </summary>
public class Entity : EngineObject
public partial class Entity : EngineObject
{
/// <summary>
/// Gets or sets the name of the <see cref="Entity"/>.
@@ -451,4 +451,10 @@ public class Entity : EngineObject
/// Will be called once when the entity is being destroyed.
/// </summary>
protected internal virtual void OnDestroy() { }
/// <summary>
/// Will be called
/// </summary>
/// <param name="collision"></param>
protected internal virtual void OnCollisionEnter2D(Collision2D collision) { }
}