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(); }
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(); } }
public void Awake() { _script = this; gameObject.SetActive(false); }