예제 #1
0
    // Use this for initialization
    void Start()
    {
        OnEndGame    += EndGame;
        maxHealth     = 1f;
        currentHealth = maxHealth;

        lives = 3;
    }
예제 #2
0
    void EndGame()
    {
        if (lives <= 0f)
        {
            updateUI.lose = true;
        }
        else
        {
            updateUI.win = true;
        }

        OnEndGame -= EndGame;

        gameObject.SetActive(false);
    }