コード例 #1
0
 private void Update()
 {
     if (Count == 0)
     {
         endGame.EndGame("Win!");
     }
 }
コード例 #2
0
 public void GetDamage()
 {
     lives--;
     if (lives % 4 == 0)
     {
         spriteRenderer.sprite = sprites[next];
         next++;
     }
     if (lives == 0)
     {
         endGame.EndGame("Lose...");
     }
 }
コード例 #3
0
    public EndGameUI EngGame()
    {
        Canvas canvas = FindObjectOfType <Canvas>();

        EndGameUI     endGame = Instantiate <EndGameUI>(_endGamePrefab);
        RectTransform rect    = endGame.GetComponent <RectTransform>();

        rect.transform.parent = canvas.transform;
        rect.localScale       = Vector3.one;
        rect.anchorMax        = Vector2.one;
        rect.anchorMin        = Vector2.one;

        endGame.EndGame(_score);

        return(endGame);
    }