void OnTriggerEnter(Collider col) { LevController levC = MainObjectSingleton.shared(MainObjectType.Player).GetComponent <LevController> (); if (col.CompareTag("Player") && levC.GetComponentInChildren <TorchUsable>() == null) { levC.lookBack(); StartCoroutine(StopLookback(levC)); } }
void OnTriggerEnter(Collider other) { LevController levC = MainObjectSingleton.shared(MainObjectType.Player).GetComponent <LevController> (); if (other.CompareTag("Player") && levC.GetComponentInChildren <TorchUsable>() != null) { levC.lookBack(); StartCoroutine(StopLookback(levC)); // startY = plank.transform.position.y; // CreateItween (); } }