public IEnumerator moveTutorial() { while (true) { float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = Input.GetAxis("Vertical"); if (moveHorizontal != 0 || moveVertical != 0) { pScript.setRestrictMovement(false); Destroy(textObject); if (targetObjects.Length != 0) { foreach (GameObject g in targetObjects) { Destroy(g); } } //yield return new WaitForSeconds(1f); setNextTutorial(); } yield return(null); } }
void restrictPlayer() { //Time.timeScale = 0f; pScript.setRestrictMovement(true); }