mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交GAS 打算做一个帧同步的GAS
This commit is contained in:
11
JEX_GAS/Assets/GAS/General/DataClass/JsonData.cs
Normal file
11
JEX_GAS/Assets/GAS/General/DataClass/JsonData.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace GAS.General
|
||||
{
|
||||
[Serializable]
|
||||
public class JsonData
|
||||
{
|
||||
public string Type;
|
||||
public string Data;
|
||||
}
|
||||
}
|
3
JEX_GAS/Assets/GAS/General/DataClass/JsonData.cs.meta
Normal file
3
JEX_GAS/Assets/GAS/General/DataClass/JsonData.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a7cb94b9dba4808bbaa27c7ddfe6f37
|
||||
timeCreated: 1709455860
|
27
JEX_GAS/Assets/GAS/General/DataClass/ObservableValue.cs
Normal file
27
JEX_GAS/Assets/GAS/General/DataClass/ObservableValue.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace GAS.General
|
||||
{
|
||||
public class ObservableValue<T>
|
||||
{
|
||||
private T _value;
|
||||
|
||||
public ObservableValue(T initialValue)
|
||||
{
|
||||
_value = initialValue;
|
||||
}
|
||||
|
||||
public T Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
var oldValue = _value;
|
||||
_value = value;
|
||||
OnValueChanged?.Invoke(oldValue, value);
|
||||
}
|
||||
}
|
||||
|
||||
public event Action<T, T> OnValueChanged;
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49847b3f12774f21ba8dbb0970c7dcb6
|
||||
timeCreated: 1702438524
|
Reference in New Issue
Block a user