IEnumerator Wait() { cmScript.psScript.testHit = true; test = false; timeRemaining = 10; yield return(new WaitForSeconds(3)); cmScript.BackToTop(); timeRemaining = 10; walkOn = false; test = false; }
IEnumerator WaitForDeadAni() { tbScript = GameObject.Find("Timer").GetComponent <TimeBalk>(); walkOn = false; yield return(new WaitForSeconds(4)); tbScript.slider.value = 0; tbScript.timeRemaining = 0; e_health = 1; Debug.Log("op"); if (win1 == true) { Debug.Log("op2"); Player1Win(); } else if (win2 == true) { Debug.Log("op3"); Player2Win(); } Debug.Log("dasasasasasasasasasasasasasasasasasas"); Destroy(enemy); tbScript.slider.value = 10; tbScript.timeRemaining = 10; tbScript.test = false; Cursor.lockState = CursorLockMode.None; cmScript = GameObject.Find("Main Camera").GetComponent <CameraMove>(); cmScript.BackToTop(); punch = true; }