Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EditorNet/src/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace Nuake
{
class Editor
{
internal static unsafe delegate*<int, void> SetSelectedEntityIcall;
internal static unsafe delegate*<int> GetSelectedEntityIcall;
internal static unsafe delegate* unmanaged<int, void> SetSelectedEntityIcall;
internal static unsafe delegate* unmanaged<int> GetSelectedEntityIcall;

static int STACK_CAPACITY = 32;
private static Stack<ICommand> CommandStack = new(STACK_CAPACITY);
Expand Down
7 changes: 2 additions & 5 deletions Nuake/src/Scripting/NetModules/SceneNetAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ namespace Nuake {
Entity entity = scene->GetEntity(entityName);

auto& scriptingEngine = ScriptingEngineNet::Get();
if (scriptingEngine.HasEntityScriptInstance(entity))
{
auto instance = scriptingEngine.GetEntityScript(entity);
outInstance->m_Handle = instance->m_Handle;
outInstance->m_Type = instance->m_Type;
if (auto instance = scriptingEngine.GetEntityScript(entity); instance) {
*outInstance = *instance;
}
}

Expand Down
40 changes: 20 additions & 20 deletions NuakeNet/src/Components.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ParentComponent(UInt32 entityId) { }
}
public class NameComponent : IComponent
{
internal static unsafe delegate*<int, NativeString> GetNameIcall;
internal static unsafe delegate* unmanaged<int, NativeString> GetNameIcall;

public NameComponent(int entityId)
{
Expand Down Expand Up @@ -51,11 +51,11 @@ public PrefabComponent(UInt32 entityId) { }

public class TransformComponent : IComponent
{
internal static unsafe delegate*<int, NativeArray<float>> GetGlobalPositionIcall;
internal static unsafe delegate*<int, NativeArray<float>> GetPositionIcall;
internal static unsafe delegate*<int, float, float, float, void> SetPositionIcall;
internal static unsafe delegate*<int, float, float, float, float, float, float, void> LookAtIcall;
internal static unsafe delegate*<int, float, float, float, void> RotateIcall;
internal static unsafe delegate* unmanaged<int, NativeArray<float>> GetGlobalPositionIcall;
internal static unsafe delegate* unmanaged<int, NativeArray<float>> GetPositionIcall;
internal static unsafe delegate* unmanaged<int, float, float, float, void> SetPositionIcall;
internal static unsafe delegate* unmanaged<int, float, float, float, float, float, float, void> LookAtIcall;
internal static unsafe delegate* unmanaged<int, float, float, float, void> RotateIcall;

public TransformComponent(int entityId)
{
Expand Down Expand Up @@ -124,9 +124,9 @@ public void LookAt(Vector3 targetPosition, Vector3 up)

public class LightComponent : IComponent
{
internal static unsafe delegate*<int, float> GetLightIntensityIcall;
internal static unsafe delegate*<int, float, void> SetLightIntensityIcall;
internal static unsafe delegate*<int, float, float, float, void> SetLightColorIcall;
internal static unsafe delegate* unmanaged<int, float> GetLightIntensityIcall;
internal static unsafe delegate* unmanaged<int, float, void> SetLightIntensityIcall;
internal static unsafe delegate* unmanaged<int, float, float, float, void> SetLightColorIcall;
public enum LightType
{
Directional,
Expand Down Expand Up @@ -175,9 +175,9 @@ public Color Color

public class CameraComponent : IComponent
{
internal static unsafe delegate*<int, NativeArray<float>> GetDirectionIcall;
internal static unsafe delegate*<int, float, void> SetCameraFOVIcall;
internal static unsafe delegate*<int, float> GetCameraFOVIcall;
internal static unsafe delegate* unmanaged<int, NativeArray<float>> GetDirectionIcall;
internal static unsafe delegate* unmanaged<int, float, void> SetCameraFOVIcall;
internal static unsafe delegate* unmanaged<int, float> GetCameraFOVIcall;

public CameraComponent(int entityId)
{
Expand Down Expand Up @@ -212,8 +212,8 @@ public Vector3 Direction

public class AudioEmitterComponent : IComponent
{
internal static unsafe delegate*<int, bool> GetIsPlayingIcall;
internal static unsafe delegate*<int, bool, void> SetIsPlayingIcall;
internal static unsafe delegate* unmanaged<int, bool> GetIsPlayingIcall;
internal static unsafe delegate* unmanaged<int, bool, void> SetIsPlayingIcall;

public AudioEmitterComponent(int entityId)
{
Expand Down Expand Up @@ -243,7 +243,7 @@ public ModelComponent(int entityId)

public class SkinnedModelComponent : IComponent
{
internal static unsafe delegate*<int, NativeString, void> PlayIcall;
internal static unsafe delegate* unmanaged<int, NativeString, void> PlayIcall;

public SkinnedModelComponent(int entityId)
{
Expand Down Expand Up @@ -328,10 +328,10 @@ public MeshColliderComponent(int entityId)

public class CharacterControllerComponent : IComponent
{
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;
internal static unsafe delegate* unmanaged<int, float, float, float, void> MoveAndSlideIcall;
internal static unsafe delegate* unmanaged<int, bool> IsOnGroundIcall;
internal static unsafe delegate* unmanaged<int, NativeArray<float>> GetGroundVelocityIcall;
internal static unsafe delegate* unmanaged<int, NativeArray<float>> GetGroundNormalIcall;

public CharacterControllerComponent(int entityId)
{
Expand Down Expand Up @@ -401,7 +401,7 @@ public SpriteComponent(int entityId) { }

public class NavMeshVolumeComponent : IComponent
{
internal static unsafe delegate*<int, float, float, float, float, float, float, NativeArray<float>> FindPathIcall;
internal static unsafe delegate* unmanaged<int, float, float, float, float, float, float, NativeArray<float>> FindPathIcall;

public NavMeshVolumeComponent(int entityId) { EntityID = entityId; }

Expand Down
4 changes: 2 additions & 2 deletions NuakeNet/src/EngineSubsystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{
public class EngineSubsystem
{
internal static unsafe delegate*<int, bool, void> SetCanTickIcall;
internal static unsafe delegate*<int, bool> GetCanTickIcall;
internal static unsafe delegate* unmanaged<int, bool, void> SetCanTickIcall;
internal static unsafe delegate* unmanaged<int, bool> GetCanTickIcall;

public int EngineSubsystemID { get; protected set; }

Expand Down
20 changes: 10 additions & 10 deletions NuakeNet/src/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ public struct CollisionData
[StructLayout(LayoutKind.Sequential)]
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;
internal static unsafe delegate*<int, NativeString, void> EntitySetNameIcall;
internal static unsafe delegate*<int, bool> EntityIsValidIcall;
internal static unsafe delegate*<NativeString, NativeArray<int>> EntityGetTargetsIcall;
internal static unsafe delegate*<int, NativeString> EntityGetTargetIcall;
internal static unsafe delegate* unmanaged<int, int, bool> EntityHasComponentIcall;
internal static unsafe delegate* unmanaged<int, int, void> EntityAddComponentIcall;
internal static unsafe delegate* unmanaged<int, bool> EntityHasManagedInstanceIcall;
internal static unsafe delegate* unmanaged<int, NativeString, int> EntityGetEntityIcall;
internal static unsafe delegate* unmanaged<int, NativeString> EntityGetNameIcall;
internal static unsafe delegate* unmanaged<int, NativeString, void> EntitySetNameIcall;
internal static unsafe delegate* unmanaged<int, bool> EntityIsValidIcall;
internal static unsafe delegate* unmanaged<NativeString, NativeArray<int>> EntityGetTargetsIcall;
internal static unsafe delegate* unmanaged<int, NativeString> EntityGetTargetIcall;

public enum ComponentTypes
{
Expand Down Expand Up @@ -272,7 +272,7 @@ public static implicit operator bool(Entity entity)

public class Prefab
{
internal static unsafe delegate*<NativeString, Vector3, float, float, float, float, int> PrefabInstanceIcall;
internal static unsafe delegate* unmanaged<NativeString, Vector3, float, float, float, float, int> PrefabInstanceIcall;

string Path { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions NuakeNet/src/Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace Nuake.Net
{
public class Environment
{
internal static unsafe delegate*<float, void> SetFocusDistanceIcall;
internal static unsafe delegate*<float> GetFocusDistanceIcall;
internal static unsafe delegate* unmanaged<float, void> SetFocusDistanceIcall;
internal static unsafe delegate* unmanaged<float> GetFocusDistanceIcall;

public static void SetFocusDistance(float distance)
{
Expand Down
18 changes: 9 additions & 9 deletions NuakeNet/src/Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ public enum ControllerAxis

public class Input
{
internal static unsafe delegate*<bool, void> ShowMouseIcall;
internal static unsafe delegate*<int, bool> IsKeyDownIcall;
internal static unsafe delegate*<int, bool> IsKeyPressedIcall;
internal static unsafe delegate*<int, bool> IsMouseButtonDownIcall;
internal static unsafe delegate*<NativeArray<float>> GetMousePositionIcall;
internal static unsafe delegate*<int, bool> IsControllerConnectedIcall;
internal static unsafe delegate*<int, NativeString> GetControllerNameIcall;
internal static unsafe delegate*<int, int, bool> IsControllerButtonPressedIcall;
internal static unsafe delegate*<int, int, float> GetControllerAxisIcall;
internal static unsafe delegate* unmanaged<bool, void> ShowMouseIcall;
internal static unsafe delegate* unmanaged<int, bool> IsKeyDownIcall;
internal static unsafe delegate* unmanaged<int, bool> IsKeyPressedIcall;
internal static unsafe delegate* unmanaged<int, bool> IsMouseButtonDownIcall;
internal static unsafe delegate* unmanaged<NativeArray<float>> GetMousePositionIcall;
internal static unsafe delegate* unmanaged<int, bool> IsControllerConnectedIcall;
internal static unsafe delegate* unmanaged<int, NativeString> GetControllerNameIcall;
internal static unsafe delegate* unmanaged<int, int, bool> IsControllerButtonPressedIcall;
internal static unsafe delegate* unmanaged<int, int, float> GetControllerAxisIcall;


public static bool IsMouseButtonDown(MouseButton button)
Expand Down
10 changes: 5 additions & 5 deletions NuakeNet/src/Physic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ public enum Layers
SENSORS = 5
}

internal static unsafe delegate*<float, float, float, float, float, float, NativeArray<float>> RayCastIcall;
internal static unsafe delegate*<float, float, float, float, float, float, BoxInternal, NativeArray<float>> ShapeCastBoxIcall;
internal static unsafe delegate*<float, float, float, float, float, float, float, NativeArray<float>> ShapeCastSphereIcall;
internal static unsafe delegate*<float, float, float, float, float, float, CapsuleInternal, NativeArray<float>> ShapeCastCapsuleIcall;
internal static unsafe delegate*<float, float, float, float, float, float, CapsuleInternal, NativeArray<float>> ShapeCastCylinderIcall;
internal static unsafe delegate* unmanaged<float, float, float, float, float, float, NativeArray<float>> RayCastIcall;
internal static unsafe delegate* unmanaged<float, float, float, float, float, float, BoxInternal, NativeArray<float>> ShapeCastBoxIcall;
internal static unsafe delegate* unmanaged<float, float, float, float, float, float, float, NativeArray<float>> ShapeCastSphereIcall;
internal static unsafe delegate* unmanaged<float, float, float, float, float, float, CapsuleInternal, NativeArray<float>> ShapeCastCapsuleIcall;
internal static unsafe delegate* unmanaged<float, float, float, float, float, float, CapsuleInternal, NativeArray<float>> ShapeCastCylinderIcall;

public static List<ShapeCastResult> RayCast(Vector3 from, Vector3 to)
{
Expand Down
8 changes: 4 additions & 4 deletions NuakeNet/src/Scene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace Nuake.Net
{
public class Scene
{
internal static unsafe delegate*<NativeString, int> GetEntityIcall;
internal static unsafe delegate*<NativeString, NativeInstance<object>*, void> GetEntityScriptFromNameIcall;
internal static unsafe delegate*<int, NativeInstance<Entity>> GetEntityScriptFromHandleIcall;
internal static unsafe delegate*<NativeString, int> InstancePrefabIcall;
internal static unsafe delegate* unmanaged<NativeString, int> GetEntityIcall;
internal static unsafe delegate* unmanaged<NativeString, NativeInstance<object>*, void> GetEntityScriptFromNameIcall;
internal static unsafe delegate* unmanaged<int, NativeInstance<Entity>> GetEntityScriptFromHandleIcall;
internal static unsafe delegate* unmanaged<NativeString, int> InstancePrefabIcall;

public static T? GetEntity<T>(string entityName) where T : class
{
Expand Down
22 changes: 11 additions & 11 deletions NuakeNet/src/UI/UIComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ public enum Visibility

public class Node
{
internal static unsafe delegate*<NativeString, NativeString, NativeString, NativeString> FindChildByIDICall;
internal static unsafe delegate*<NativeString, NativeString, bool> HasNativeInstanceICall;
internal static unsafe delegate*<NativeString, NativeString, NativeInstance<Node>> GetNativeInstanceNodeICall;
internal static unsafe delegate*<NativeString, NativeString, Bool32, void> SetVisibilityICall;
internal static unsafe delegate*<NativeString, NativeString, Bool32> GetVisibilityICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, NativeString, NativeString> FindChildByIDICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, bool> HasNativeInstanceICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, NativeInstance<Node>> GetNativeInstanceNodeICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, Bool32, void> SetVisibilityICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, Bool32> GetVisibilityICall;

internal static unsafe delegate*<NativeString, NativeString, float> GetHeightPercentageICall;
internal static unsafe delegate*<NativeString, NativeString, float, void> SetHeightPercentageICall;
internal static unsafe delegate*<NativeString, NativeString, float> GetWidthPercentageICall;
internal static unsafe delegate*<NativeString, NativeString, float, void> SetWidthPercentageICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, float> GetHeightPercentageICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, float, void> SetHeightPercentageICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, float> GetWidthPercentageICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, float, void> SetWidthPercentageICall;

public string UUID;
public string CanvasUUID;
Expand Down Expand Up @@ -202,8 +202,8 @@ public T FindChildByID<T>(string id) where T : Node

public class TextNode : Node
{
internal static unsafe delegate*<NativeString, NativeString, NativeString, void> SetTextNodeTextICall;
internal static unsafe delegate*<NativeString, NativeString, NativeString> GetTextNodeTextICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, NativeString, void> SetTextNodeTextICall;
internal static unsafe delegate* unmanaged<NativeString, NativeString, NativeString> GetTextNodeTextICall;

public string Text
{
Expand Down
16 changes: 8 additions & 8 deletions NuakeNet/src/main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace Nuake.Net
/// </summary>
public class Engine
{
internal static unsafe delegate*<NativeString, void> LoggerLogIcall;
internal static unsafe delegate*<NativeString, void> LoadSceneIcall;
internal static unsafe delegate*<NativeString, NativeInstance<EngineSubsystem>> GetSubsystemByNameIcall;
internal static unsafe delegate* unmanaged<NativeString, void> LoggerLogIcall;
internal static unsafe delegate* unmanaged<NativeString, void> LoadSceneIcall;
internal static unsafe delegate* unmanaged<NativeString, NativeInstance<EngineSubsystem>> GetSubsystemByNameIcall;

public Engine() { }

Expand Down Expand Up @@ -147,38 +147,38 @@ public PointScript(string description = "")

public class Debug
{
internal static unsafe delegate*</* start */ float, float, float,
internal static unsafe delegate* unmanaged</* start */ float, float, float,
/* end */ float, float, float,
/* color */ float, float, float, float,
/* life */ float,
float,
void> DrawLineIcall;

internal static unsafe delegate*</* position */ Vector3,
internal static unsafe delegate* unmanaged</* position */ Vector3,
/* rotation */ Quaternion,
/* shape */ Vector3,
/* color */ Vector4,
/* life */ float,
float,
void> DrawShapeBoxIcall;

internal static unsafe delegate*</* position */ Vector3,
internal static unsafe delegate* unmanaged</* position */ Vector3,
/* rotation */ Quaternion,
/* shape */ float,
/* color */ Vector4,
/* life */ float,
float,
void> DrawShapeSphereIcall;

internal static unsafe delegate*</* position */ Vector3,
internal static unsafe delegate* unmanaged</* position */ Vector3,
/* rotation */ Quaternion,
/* shape */ float, float,
/* color */ Vector4,
/* life */ float,
float,
void> DrawShapeCylinderIcall;

internal static unsafe delegate*</* position */ Vector3,
internal static unsafe delegate* unmanaged</* position */ Vector3,
/* rotation */ Quaternion,
/* shape */ float, float,
/* color */ Vector4,
Expand Down