增加收获属性逻辑,优化掉落物表现效果

This commit is contained in:
2026-10-05 17:02:29 +08:00
parent d55b1013ca
commit 7590d78e74
53 changed files with 1633 additions and 241 deletions
@@ -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;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 17f56868934d4df4b230b3a12924fba7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
using GameFramework;
using GameFramework.Event;
namespace SepCore.Event
{
public class WaveHarvestSettlementEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(WaveHarvestSettlementEventArgs).GetHashCode();
public override int Id => EventId;
public int HarvestIncome { get; private set; }
public int HarvestGrowth { get; private set; }
public int CurrentHarvest { get; private set; }
public WaveHarvestSettlementEventArgs()
{
HarvestIncome = 0;
HarvestGrowth = 0;
CurrentHarvest = 0;
}
public static WaveHarvestSettlementEventArgs Create(int income, int growth, int currentHarvest)
{
var args = ReferencePool.Acquire<WaveHarvestSettlementEventArgs>();
args.HarvestIncome = income;
args.HarvestGrowth = growth;
args.CurrentHarvest = currentHarvest;
return args;
}
public override void Clear()
{
HarvestIncome = 0;
HarvestGrowth = 0;
CurrentHarvest = 0;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b78ae26ee6734a84aad77ca563607ee2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: