private void OnTriggerEnter(Collider other) { if (!other.CompareTag("BowlFinishing")) { if (other.gameObject.layer == HandController.LAYER_ITEM && !other.CompareTag("Bowl")) { waitToThrows.Add(other.GetComponent <Rigidbody>()); } return; } BowlFinishing bowl = other.GetComponent <BowlFinishing>(); if (menuNote.text != "" && bowl.HasOrangeFishBall && ((foodChecker.soupReq >= 1 && bowl.HasSoup) || (foodChecker.soupReq <= 0 && !bowl.HasSoup)) && foodChecker.porkReq == bowl.RedPorkCount && foodChecker.noodleReq == bowl.NoodleCount) { winParticle.Play(); whiteboard.FinishOrder(foodChecker.seatNo - 1); bowl.transform.parent.GetComponent <Rigidbody>().AddForce(Vector3.up * 10000); Destroy(bowl.transform.parent.gameObject, 1f); StartCoroutine(Wait()); } else { waitToThrows.Add(bowl.transform.parent.GetComponent <Rigidbody>()); } }
IEnumerator WaitToLeave() { countDownWaitToLeave = true; float t; if (Boss) { t = 1.0f; } else { t = 2.0f; } yield return(new WaitForSeconds(t)); waitToLeave = true; wBoard.FinishOrder(target); }