mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-11-04 12:51:48 +00:00
Remove mono from Glue functions
This commit is contained in:
@@ -36,6 +36,12 @@ static class CoreClrHelper
|
||||
private function void CreateScriptInstanceFunc(UUID entityId, char8* scriptClassName);
|
||||
static CreateScriptInstanceFunc _createScriptInstance;
|
||||
|
||||
private function void ThrowExceptionFunc(char8* message);
|
||||
static ThrowExceptionFunc _throwException;
|
||||
|
||||
private function void RegisterComponentTypeFunc(StringView fullComponentTypeName, function void(UUID entityId) addComponent, function bool(UUID entityId) hasComponent, function void(UUID entityId) removeComponent);
|
||||
static RegisterComponentTypeFunc _registerComponentType;
|
||||
|
||||
public static ScriptFunctionPointers _entityScriptFunctions;
|
||||
|
||||
public static void Init(StringView coreAssemblyPath)
|
||||
@@ -106,6 +112,9 @@ static class CoreClrHelper
|
||||
|
||||
GetFunctionPointerUnmanagedCallersOnly("GlitchyEngine.ScriptGlue, ScriptCore", "CreateScriptInstance", out _createScriptInstance);
|
||||
|
||||
GetFunctionPointerUnmanagedCallersOnly("GlitchyEngine.ScriptGlue, ScriptCore", "ThrowException", out _throwException);
|
||||
GetFunctionPointerUnmanagedCallersOnly("GlitchyEngine.ScriptGlue, ScriptCore", "RegisterComponentType", out _registerComponentType);
|
||||
|
||||
InitEntityFunctions();
|
||||
}
|
||||
|
||||
@@ -182,4 +191,14 @@ static class CoreClrHelper
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
public static void ThrowException(StringView message)
|
||||
{
|
||||
_throwException(message.Ptr);
|
||||
}
|
||||
|
||||
public static void RegisterComponent(StringView fullComponentTypeName, function void(UUID entityId) addComponent, function bool(UUID entityId) hasComponent, function void(UUID entityId) removeComponent)
|
||||
{
|
||||
_registerComponentType(fullComponentTypeName, addComponent, hasComponent, removeComponent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user