private void OnTriggerExit2D(Collider2D collision) { PlatformerCharacter pc = collision.gameObject.GetComponent <PlatformerCharacter>(); if (pc) { SetRoomStatus(false); } }
private void OnTriggerEnter2D(Collider2D collision) { //Debug.Log("Trigger Entered"); PlatformerCharacter pc = collision.gameObject.GetComponent <PlatformerCharacter>(); if (pc) { //Debug.Log("Setting new room for camera."); _cameraFollow.SetRoom(this); SetRoomStatus(true); } }
void Start() { // Cache Components _pc = GetComponent <PlatformerCharacter>(); }