コード例 #1
0
ファイル: Enemy.cs プロジェクト: rbrt/pk
    IEnumerator Dead()
    {
        animateEnemy.Dead();

        GameObject.Destroy(GetComponent <Rigidbody>());
        GameObject.Destroy(GetComponent <BoxCollider>());

        if (fightSequence)
        {
            fightSequence.HandleEnemyDeath(gameObject);
        }
        else
        {
            Debug.Log(gameObject.name + " has no associated FightSequence", gameObject);
        }
        yield break;
    }