summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs')
-rw-r--r--WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs b/WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs
index b4869cb..8dbb161 100644
--- a/WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs
+++ b/WorldlineKeepers/Assets/Scripts/Stats/CharacterStatsBase.cs
@@ -7,24 +7,24 @@ using WK.Data;
namespace WK
{
- [System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)]
+ [StructLayout(LayoutKind.Explicit)]
public struct CharacterStatsValue
{
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public int i;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public float f;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public bool boolean;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public char c;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public Vector2 v2;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public Vector3 v3;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public Vector4 v4;
- [System.Runtime.InteropServices.FieldOffset(0)]
+ [FieldOffset(0)]
public Color color;
}
@@ -44,7 +44,15 @@ namespace WK
/// µ±Ç°ÊôÐÔÖµ
/// </summary>
public CharacterStatsValue value;
-
+
+ public ref int intValue => ref value.i;
+ public ref bool boolValue => ref value.boolean;
+ public ref float floatValue => ref value.f;
+ public ref char chartValue => ref value.c;
+ public ref Vector2 Vector2Value => ref value.v2;
+ public ref Vector3 Vector3Value => ref value.v3;
+ public ref Vector4 Vector4Value => ref value.v4;
+
public string uid
{
get