Beispiel #1
0
 public void loseHealth(float amt, lossState loss)
 {
     health -= amt;
     if (health <= 0)
     {
         LevelLose(loss);
     }
     else
     {
         //GameObject.Find("Click Manager").GetComponent<ClickManager>().handRetract.Invoke();
     }
 }
Beispiel #2
0
    void LevelLose(lossState loss)
    {
        // Pause all functionality
        Pause();

        switch (loss)
        {
        case lossState.OWNER:
            Debug.Log("Owner Loss");
            break;

        case lossState.BIRD:
            Debug.Log("Bird Loss");
            break;

        case lossState.POOP:
            Debug.Log("Poop Loss");
            break;
        }
        // make restart button visible and interactable
        mainMenuUI.transform.Find("Restart").GetComponent <CanvasGroup>().alpha          = 1;
        mainMenuUI.transform.Find("Restart").GetComponent <CanvasGroup>().interactable   = true;
        mainMenuUI.transform.Find("Restart").GetComponent <CanvasGroup>().blocksRaycasts = true;
    }