Пример #1
0
        private void OnTriggerExit2D(Collider2D collision)
        {
            PlatformerCharacter pc = collision.gameObject.GetComponent <PlatformerCharacter>();

            if (pc)
            {
                SetRoomStatus(false);
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 void Start()
 {
     // Cache Components
     _pc = GetComponent <PlatformerCharacter>();
 }