增加收获属性逻辑,优化掉落物表现效果
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class DropSpawnRequestedEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(DropSpawnRequestedEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public Vector3 Position { get; private set; }
|
||||
|
||||
public DropSpawnRequestedEventArgs()
|
||||
{
|
||||
Position = Vector3.zero;
|
||||
}
|
||||
|
||||
public static DropSpawnRequestedEventArgs Create(Vector3 position)
|
||||
{
|
||||
var args = ReferencePool.Acquire<DropSpawnRequestedEventArgs>();
|
||||
args.Position = position;
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Position = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user