初始化仓库
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:
|
||||
Reference in New Issue
Block a user