private void Awake() { if (Instance == null) { Instance = this; } }
public void InitGame() { SetRandomValue(); SetImage(); ColorGameManager.GetInstance().colorData = randStringArr; }
private void OnTriggerEnter(Collider other) { if (!ColorGameManager.isClickDelay) { Debug.Log(other.gameObject.name); Debug.Log("DataColor : " + other.GetComponent <ColorData>().colorName); ColorGameManager.GetInstance().ColorDataCheck(other.GetComponent <ColorData>().colorName); gameObject.SetActive(false); } }
private IEnumerator CountDown() { while (!isEnd) { yield return(new WaitUntil(() => !ColorGameUIManager.isShowingText)); yield return(new WaitForSeconds(1f)); countNum -= 1; countDownText.text = countNum.ToString(); if (countNum == 0) { isEnd = true; ColorGameManager.GetInstance().GameOver(); } else if (countNum % 10 == 0) { arrowMove.ArrowSpeedUp(); } } }