mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-06 06:09:52 +03:00
28 lines
592 B
C#
28 lines
592 B
C#
using Coral.Managed.Interop;
|
|
using System;
|
|
|
|
namespace Nuake.Net
|
|
{
|
|
public class Scene
|
|
{
|
|
internal static unsafe delegate*<NativeString, int> GetEntityIcall;
|
|
|
|
public static Entity GetEntity(string entityName)
|
|
{
|
|
int handle;
|
|
unsafe { handle = GetEntityIcall(entityName); }
|
|
|
|
if (handle == -1)
|
|
{
|
|
throw new Exception("Entity not found");
|
|
}
|
|
|
|
Entity entity = new Entity
|
|
{
|
|
ECSHandle = handle
|
|
};
|
|
|
|
return entity;
|
|
}
|
|
}
|
|
} |