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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Packages/SOGameEvents/Editor/UIntGameEventEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using UnityEditor;

namespace RaCoding.GameEvents
{
[CustomEditor(typeof(GameEvent<uint>), editorForChildClasses: true)]
public class UIntGameEventEditor : GameEventEditor<uint>
{
protected override uint GetValue()
{
return (uint)EditorGUILayout.IntField(1);
}
}
}
11 changes: 11 additions & 0 deletions Packages/SOGameEvents/Editor/UIntGameEventEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Packages/SOGameEvents/Runtime/Events/UIntGameEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEngine;

namespace RaCoding.GameEvents
{
[CreateAssetMenu(fileName = "UIntGameEvent", menuName = "RaCoding/GameEvent/Create new uint game event")]
public class UIntGameEvent : GameEvent<uint> { }
}
11 changes: 11 additions & 0 deletions Packages/SOGameEvents/Runtime/Events/UIntGameEvent.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEngine.Events;

namespace RaCoding.GameEvents
{
[System.Serializable]
public class UIntUnityEvent : UnityEvent<uint> { }
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEngine;

namespace RaCoding.GameEvents
{
[AddComponentMenu("RaCoding/GameEvents/UIntGameEventListener")]
public class UIntComponentGameEventListener : ComponentGameEventListener<UIntGameEventListener, uint> { }
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Packages/SOGameEvents/Runtime/Listener/UIntGameEventListener.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using UnityEngine;
using UnityEngine.Events;

namespace RaCoding.GameEvents
{
[System.Serializable]
public class UIntGameEventListener : GameEventListener<uint>
{
public UIntGameEventListener() : base() { }

public UIntGameEventListener(IRegisterListener registerListener) : base(registerListener) { }

[SerializeField] private UIntGameEvent uintEvent;
[SerializeField] private UIntUnityEvent uintResponse;

public override GameEvent<uint> Event => uintEvent;
public override UnityEvent<uint> Response => uintResponse;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Install with the Unity Package Manager: https://github.com/Ra-Coding/unity-scrip
- byte
- short
- int
- uint
- long
- float
- char
Expand Down