第一批重构,主要是物理迁移脚本和部分命名空间的调整
- 结构上迁移文件,将脚本分成 Base/Runtime/Presentation/Procedure/Editor 五大文件夹 - 调整 DataTable 和 Definition 下脚本的命名空间 - 依据 UI-5层架构设计规范 拆分原先的 UI 到 Runtime 和 Presentation 下
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace CustomEvent
|
||||
{
|
||||
public class PlayerCoinChangeEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(PlayerCoinChangeEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int Gain { get; private set; }
|
||||
|
||||
public int CoinCount { get; private set; }
|
||||
|
||||
public PlayerCoinChangeEventArgs()
|
||||
{
|
||||
Gain = 0;
|
||||
CoinCount = 0;
|
||||
}
|
||||
|
||||
public static PlayerCoinChangeEventArgs Create(int gain, int coinCount)
|
||||
{
|
||||
var args = ReferencePool.Acquire<PlayerCoinChangeEventArgs>();
|
||||
args.Gain = gain;
|
||||
args.CoinCount = coinCount;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Gain = 0;
|
||||
CoinCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5397f71ffb0ec542a8d82349d2b87ce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,37 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace CustomEvent
|
||||
{
|
||||
public class PlayerExpChangeEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(PlayerExpChangeEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int CurrentExp { get; private set; }
|
||||
|
||||
public int MaxExp { get; private set; }
|
||||
|
||||
public PlayerExpChangeEventArgs()
|
||||
{
|
||||
CurrentExp = 0;
|
||||
MaxExp = 0;
|
||||
}
|
||||
|
||||
public static PlayerExpChangeEventArgs Create(int currentExp, int maxExp)
|
||||
{
|
||||
var args = ReferencePool.Acquire<PlayerExpChangeEventArgs>();
|
||||
args.CurrentExp = currentExp;
|
||||
args.MaxExp = maxExp;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
CurrentExp = 0;
|
||||
MaxExp = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df4e3161b15f43348b28e3abc199c6a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace CustomEvent
|
||||
{
|
||||
public class PlayerHealthChangeEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(PlayerHealthChangeEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int Damage { get; private set; }
|
||||
|
||||
public int CurrentHealth { get; private set; }
|
||||
|
||||
public int MaxHealth { get; private set; }
|
||||
|
||||
public PlayerHealthChangeEventArgs()
|
||||
{
|
||||
Damage = 0;
|
||||
CurrentHealth = 0;
|
||||
MaxHealth = 0;
|
||||
}
|
||||
|
||||
public static PlayerHealthChangeEventArgs Create(int damage, int currentHealth, int maxHealth)
|
||||
{
|
||||
var args = ReferencePool.Acquire<PlayerHealthChangeEventArgs>();
|
||||
args.Damage = damage;
|
||||
args.CurrentHealth = currentHealth;
|
||||
args.MaxHealth = maxHealth;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Damage = 0;
|
||||
CurrentHealth = 0;
|
||||
MaxHealth = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 360d3b70d3fbfc048a9ad5beb0d7bf84
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace CustomEvent
|
||||
{
|
||||
public class PlayerLevelUpEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(PlayerLevelUpEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public PlayerLevelUpEventArgs()
|
||||
{
|
||||
}
|
||||
|
||||
public static PlayerLevelUpEventArgs Create()
|
||||
{
|
||||
var args = ReferencePool.Acquire<PlayerLevelUpEventArgs>();
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59e602f086ce428396eab715b1277a23
|
||||
timeCreated: 1770989625
|
||||
Reference in New Issue
Block a user