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

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
@@ -1,7 +1,6 @@
using Cysharp.Threading.Tasks;
using SepCore.AsyncTask;
using SepCore.Components;
using SepCore.Definition;
using SepCore.Event;
using UnityEngine;
using UnityGameFramework.Runtime;
@@ -75,13 +74,7 @@ namespace SepCore.Entity
{
if (Random.value < EnemyData.DropPercent)
{
int coinCount = GameEntry.Luban.Global.DropEntityCoinCount;
int expCount = GameEntry.Luban.Global.DropEntityExpCount;
var data = new DropData(coinCount, expCount, GameEntry.Entity.NextId())
{
Position = CachedTransform.position
};
GameEntry.Entity.ShowDropAsync(data).Forget();
GameEntry.Event.Fire(this, DropSpawnRequestedEventArgs.Create(CachedTransform.position));
}
base.OnDead(attacker);