mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Started Transform .Net API
- Euler Rotate
- Set local translation
- Separated C# modules
- Bumped Coral 🪸
This commit is contained in:
27
NuakeNet/src/Scene.cs
Normal file
27
NuakeNet/src/Scene.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user