IEnumerator StartWait() { yield return(StartCoroutine(Wait(1.50F))); Spark.SetActive(false); Cyclone.SetActive(false); Blast.SetActive(false); }
void OnGUI() { if (mShowGUIButton) { // draw the GUI button if (GUI.Button(attackButton2, "ATK/300")) { Debug.Log("Attack!"); Cyclone.SetActive(false); Spark.SetActive(true); Blast.SetActive(true); StartCoroutine(StartWait()); // do something on button click } if (GUI.Button(defenseButton2, "DEF/200")) { Debug.Log("Defense!"); Cyclone.SetActive(true); //Spark.SetActive(false); } } }
void AblitiesCheck() { if (Ghoster >= 0) { Ghoster -= Time.deltaTime; Ghost.SetActive(true); controller.Anim.SetBool("Ghost", true); } else { Ghost.SetActive(false); controller.Anim.SetBool("Ghost", false); } if (Warper >= 0) { Warper -= Time.deltaTime; Warp.SetActive(true); } else { Warp.SetActive(false); } if (Time.timeScale != 1f && Warper <= 0 && GameManager.Instance.isPaused == false) { Time.timeScale = 1f; } if (Blaster >= 0) { Blaster -= Time.deltaTime; Blast.SetActive(true); } else { Blast.SetActive(false); } }