mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
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:
@@ -1,6 +1,7 @@
|
||||
using Mono;
|
||||
using GlitchyEngine.Core;
|
||||
using System;
|
||||
using GlitchyEngine.Scripting.Classes;
|
||||
|
||||
namespace GlitchyEngine.Scripting;
|
||||
|
||||
@@ -80,6 +81,17 @@ class ScriptInstance : RefCounter
|
||||
if (exception != null)
|
||||
ScriptEngine.HandleMonoException(exception, this);
|
||||
}
|
||||
|
||||
public void InvokeOnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
if (!_scriptClass.HasCollisionEnter2D)
|
||||
return;
|
||||
|
||||
_scriptClass.OnCollisionEnter2D(_instance, collision, let exception);
|
||||
|
||||
if (exception != null)
|
||||
ScriptEngine.HandleMonoException(exception, this);
|
||||
}
|
||||
|
||||
public T GetFieldValue<T>(ScriptField field)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user