mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Added ground normal & ground velocity C# API e
This commit is contained in:
@@ -311,6 +311,8 @@ namespace Nuake.Net
|
||||
{
|
||||
internal static unsafe delegate*<int, float, float, float, void> MoveAndSlideIcall;
|
||||
internal static unsafe delegate*<int, bool> IsOnGroundIcall;
|
||||
internal static unsafe delegate*<int, NativeArray<float>> GetGroundVelocityIcall;
|
||||
internal static unsafe delegate*<int, NativeArray<float>> GetGroundNormalIcall;
|
||||
|
||||
public CharacterControllerComponent(int entityId)
|
||||
{
|
||||
@@ -326,6 +328,24 @@ namespace Nuake.Net
|
||||
{
|
||||
unsafe { return IsOnGroundIcall(EntityID); }
|
||||
}
|
||||
|
||||
public Vector3 GetGroundNormal()
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
NativeArray<float> resultArray = GetGroundNormalIcall(EntityID);
|
||||
return new(resultArray[0], resultArray[1], resultArray[2]);
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 GetGroundVelocity()
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
NativeArray<float> resultArray = GetGroundVelocityIcall(EntityID);
|
||||
return new(resultArray[0], resultArray[1], resultArray[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ParticleEmitterComponent : IComponent
|
||||
|
||||
Reference in New Issue
Block a user