Skip to content

Commit d2d2101

Browse files
committed
Add ushort variables
1 parent 4603822 commit d2d2101

File tree

7 files changed

+61
-0
lines changed

7 files changed

+61
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEditor;
2+
3+
namespace RaCoding.Variables
4+
{
5+
[CustomEditor(typeof(UShortMutableVariable), editorForChildClasses: true)]
6+
public class UShortVariableEditor : VariableEditor<ushort>
7+
{
8+
protected override void AssignResetValue()
9+
{
10+
resetValue.intValue = value.intValue;
11+
}
12+
}
13+
}

Packages/SOVariables/Editor/UShortVariableEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using UnityEngine;
2+
3+
namespace RaCoding.Variables
4+
{
5+
[CreateAssetMenu(fileName = "UShortImmutableVariable", menuName = "RaCoding/Variables/Immutable/Create new immutable ushort variable")]
6+
public class UShortImmutableVariable : ImmutableVariable<ushort> { }
7+
}

Packages/SOVariables/Runtime/Immutable/UShortImmutableVariable.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using UnityEngine;
2+
3+
namespace RaCoding.Variables
4+
{
5+
[CreateAssetMenu(fileName = "UShortMutableVariable", menuName = "RaCoding/Variables/Mutable/Create new mutable ushort variable")]
6+
public class UShortMutableVariable : MutableVariable<ushort> { }
7+
}

Packages/SOVariables/Runtime/Mutable/UShortMutableVariable.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Install with the Unity Package Manager: https://github.com/Ra-Coding/unity-scrip
1212
- byte
1313
- sbyte
1414
- short
15+
- ushort
1516
- int
1617
- long
1718
- char

0 commit comments

Comments
 (0)