void OnTriggerEnter(Collider other) { if (other.tag.Contains("cylinder")) { Debug.Log("cylinder entered"); //Update images walkthroughScript.setStep(walkthroughScript.step1B); } }
void OnTriggerEnter(Collider other) { if (other.tag.Contains("Mordant")) { Debug.Log("cylinder entered"); //Update images walkthroughScript.setStep(walkthroughScript.step1B); } if (other.tag.Contains("Hammer")) { walkthroughScript.setStep(walkthroughScript.step2B); } if (other.tag.Contains("Spatula")) { walkthroughScript.setStep(walkthroughScript.step3B); } }
public void OnTriggerEnter(Collider other) { if (walkthroughScript.hammerRetrieved == true && other.tag.Contains("paint")) { //Only crush paint GameObject exp = Instantiate(explosion, other.gameObject.transform.position, Quaternion.identity); other.gameObject.SetActive(false); Destroy(exp, 1.5f); walkthroughScript.showStepCompleteScreen(walkthroughScript.step2); walkthroughScript.setStep(walkthroughScript.step3); } }
void OnCollisionStay(Collision collision) { bool spatulaRetrieved = walkthroughScript.spatulaRetrieved; if (collision.collider.tag.Contains("beaker")) { if (spatulaRetrieved == true && beakerStirred == false) { numCollisions++; if (numCollisions >= 50) { beakerStirred = true; Debug.Log("Stirring done."); walkthroughScript.setStep(walkthroughScript.step4); } } } }