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

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,4 +1,3 @@
using SepCore.Entity;
using UnityEngine;
using UnityGameFramework.Runtime;
@@ -22,8 +21,6 @@ namespace SepCore.Entity
{
Log.Error("DropEntity.OnShow() called with wrong type: {0}.", userData?.GetType().Name);
}
CachedTransform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
}
public bool TryCollect(Player player, float collectDistance = 0f)
@@ -48,10 +45,5 @@ namespace SepCore.Entity
GameEntry.Entity.HideEntity(this);
return true;
}
private void OnTriggerEnter(Collider other)
{
TryCollect(other.GetComponent<Player>());
}
}
}