public void OnTriggerExit(Collider other1) { if (other1.gameObject.CompareTag("Player")) { MainCanvas = GameObject.Find("MainUICanvas"); levelOneObjectives lvl2 = MainCanvas.GetComponent <levelOneObjectives> (); lvl2.isMoveBackward = true; } }
public void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Player")) { MainCanvas = GameObject.Find("MainUICanvas"); levelOneObjectives lvl1 = MainCanvas.GetComponent <levelOneObjectives> (); lvl1.isTurnedRight = true; } }