public override void Init() { base.Init(); GameStartPanel.SetActive(true); GameOverPanel.SetActive(false); GamePanel.SetActive(false); }
public void GameStart() { GamePanel.SetActive(true); GameStartPanel.SetActive(false); GameOverPanel.SetActive(false); for (int i = 0, iMax = gameArea.GetLength(0); i < iMax; i++) { for (int j = 0, jMax = gameArea.GetLength(1); j < jMax; j++) { if (gameArea[i, j] != null) { gameArea[i, j] = null; } } } GameObject[] objects = GameObject.FindGameObjectsWithTag("Object"); for (int i = 0, iMax = objects.Length; i < iMax; i++) { Destroy(objects[i]); } isLost = false; StartCoroutine(GameMain()); }