private IEnumerator SpawnSun() { while (!currentGameStage.Equals(GameStage.Ended)) { float delta = 0.0f; float coolDown = Random.Range(8.0f, 11.0f); while (delta <= coolDown) { delta += Time.deltaTime; yield return(null); } float genX = Random.Range(AxisManager.XAxis[0], AxisManager.XAxis[AxisManager.XAxis.Count - 1]); Instantiate(Resources.Load("Sun", typeof(GameObject)), new Vector3(genX, 32.0f, 1.0f), Quaternion.identity); yield return(null); } }
// Update is called once per frame void Update() { if (stage.Equals(GameStage.execMoves)) { moveEnemies(); } }
private void checkPlayerActions() { if (isHasHumanPlayer()) { if (!playerController.isHasRemainingInteractions() && CURRENT_STAGE.Equals(GameStage.NIGHT) && !playerController.startedAsVillager()) { EndTurnBtn.SetActive(true); } } }