public virtual void DoDeath() { if (DeathParam == null) { DeathParam = new DeathParam(); } OnDeath(); Clear(); SpawnMgr?.Despawn(this, DeathParam.IsDelayDespawn ? DeathDespawnTime : 0); DeathParam = null; }
public void SetDeathParam(DeathParam param) { DeathParam = param; }
public void DoDeath(DeathParam param) { SetDeathParam(param); DoDeath(); }