Beispiel #1
0
 public void ReGeneratField()
 {
     isGenerated = false;
     if (enemyInstance1 != null)
     {
         Destroy(enemyInstance1.gameObject);
     }
     if (enemyInstance2 != null)
     {
         Destroy(enemyInstance2.gameObject);
     }
     if (characterInstance != null)
     {
         Destroy(characterInstance.gameObject);
     }
     if (startGrounCell != null)
     {
         Destroy(startGrounCell.gameObject);
     }
     if (endGroundCell != null)
     {
         Destroy(endGroundCell.gameObject);
     }
     EndGameMenuSceneScript.Hide();
     isGame = true;
     Generate();
 }
Beispiel #2
0
 public void EndGame(GameEndType type)
 {
     //Time.timeScale = 0;
     if (isGame)
     {
         GameField.isGame = false;
         string text = "";
         if (type == GameEndType.LOSE)
         {
             text = "You Lose";
         }
         else
         {
             text = "You Win";
         }
         EndGameMenuSceneScript.Show(text);
         //Debug.Break();
     }
 }
Beispiel #3
0
 public void Awake()
 {
     _script = this;
     gameObject.SetActive(false);
 }