IEnumerator OnTriggerEnter(Collider other) { if (popUpTextPrefab && other.gameObject.name == "jumpUP") { movement3 movement3 = GetComponent <movement3>(); movement3.canMove = false; ShowpopUpText(); yield return(new WaitForSeconds(3)); movement3.canMove = true; } }
private void Start() { speedAccess = gameObject.GetComponent <movement3>(); }