private void Update() { if (this.isActiveAndEnabled) { m_fExistTime += Time.deltaTime; if (m_fExistTime >= m_fLifeTime) { m_fExistTime = 0; //BulletPool.g_uniqueInstance.BackToBulletPool(this.gameObject); //BP.BackToBulletPool(this.gameObject); m_reuse.Invoke(this.gameObject); } } }
private void OnTriggerEnter(Collider other) { if (other.CompareTag(playerTag)) { player.Damage(damage); Reuse?.Invoke(this); } }
private void AnimationEnd() //自訂的函式,在動畫結束時呼叫 { if (m_reuse != null) { m_reuse.Invoke(this.gameObject); } else { Destroy(this.gameObject); } }
private void Die() { gm.ScoreUp(); player.StrengtUp(strengthUpIfDie); Reuse?.Invoke(this); }