예제 #1
0
    private IEnumerator Death()
    {
        switch (faction)
        {
        case UNITFACTION.ENEMY:
            agent.isStopped             = true;
            controller.detectCollisions = rb.detectCollisions = false;

            //Add Scire
            managerGame.UpdateKills(1);
            break;

        case UNITFACTION.PLAYER:

            break;
        }

        statsUI.Recycle();

        animator.SetBool("boolDead", true);
        yield return(new WaitForSeconds(1.0f));

        Recycle();
        yield return(null);
    }