Renamed exe to Nuake Engine + added C# endpoints i forgot to push
This commit is contained in:
@@ -23,6 +23,7 @@ namespace Nuake.Net
|
||||
public class Entity
|
||||
{
|
||||
internal static unsafe delegate*<int, int, bool> EntityHasComponentIcall;
|
||||
internal static unsafe delegate*<int, int, void> EntityAddComponentIcall;
|
||||
internal static unsafe delegate*<int, bool> EntityHasManagedInstanceIcall;
|
||||
internal static unsafe delegate*<int, NativeString, int> EntityGetEntityIcall;
|
||||
internal static unsafe delegate*<int, NativeString> EntityGetNameIcall;
|
||||
@@ -207,6 +208,20 @@ namespace Nuake.Net
|
||||
return false;
|
||||
}
|
||||
|
||||
public T? AddComponent<T>() where T : IComponent
|
||||
{
|
||||
if(HasComponent<T>())
|
||||
{
|
||||
return (T?)Activator.CreateInstance(typeof(T), ECSHandle);
|
||||
}
|
||||
|
||||
unsafe
|
||||
{
|
||||
EntityAddComponentIcall(ECSHandle, (int)MappingTypeEnum[typeof(T)]);
|
||||
return (T?)Activator.CreateInstance(typeof(T), ECSHandle);
|
||||
};
|
||||
}
|
||||
|
||||
public T? GetComponent<T>() where T : IComponent
|
||||
{
|
||||
if (HasComponent<T>())
|
||||
|
||||
@@ -356,11 +356,13 @@ project "NuakeRuntime"
|
||||
|
||||
project "Editor"
|
||||
location "Editor"
|
||||
targetname ("Nuake Engine")
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
cppdialect "C++20"
|
||||
staticruntime "On"
|
||||
|
||||
dependson { "NuakeNet" }
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
||||
debugdir ("%{prj.name}")
|
||||
|
||||
Reference in New Issue
Block a user