예제 #1
0
    protected IEnumerator HitByEnemy()
    {
        if (lives != 0)
        {
            lives--;
            controller.livesText.text = lives.ToString();
            yield return(new WaitForSeconds(2));
        }
        else
        {
            controller.GameOver();
        }

        playerState = PlayerState.Idle;
    }