Example #1
0
 protected virtual void OnInteractableObjectOutRange()
 {
     // m_canInteract = false;
     m_isInRange = false;
     m_currentInteractionTrigger = null;
     OnInteractableObjectOutRangeEvent(this);
 }
Example #2
0
 protected virtual void OnTriggerExitCallback(Collider other, InteractableInRangeTrigger trigger)
 {
     if (other.gameObject.tag == m_player.tag)
     {
         m_isInRange = false;
         m_currentInteractionTrigger = null;
     }
 }
 protected override void OnTriggerExitCallback(Collider other, InteractableInRangeTrigger trigger)
 {
     // exit condition are handled from the player position on the ladder
     if (!m_isInInteraction)
     {
         base.OnTriggerExitCallback(other, trigger);
     }
 }
Example #4
0
 protected virtual void OnTriggerEnterCallback(Collider other, InteractableInRangeTrigger trigger)
 {
     if (other.gameObject.tag == m_player.tag)
     {
         m_currentInteractionTrigger = trigger;
         // Debug.Log(" player entered");
         m_isInRange = true;
     }
 }
        protected override void OnTriggerEnterCallback(Collider other, InteractableInRangeTrigger trigger)
        {
            if (m_isInInteraction)
            {
                return;                    // if in interaction we need to exit the ladder first
            }
            if (trigger.TriggerID == m_downTriggerID)
            {
                m_currentPlayerClimbPercentage = 0.0f;
                m_currentPlayerClimbDirection  = DirectionClimb.Up;
            }
            else if (trigger.TriggerID == m_upTriggerID)
            {
                m_currentPlayerClimbPercentage = 1.0f;
                m_currentPlayerClimbDirection  = DirectionClimb.Down;
            }

            // there are two colliders so no need to enter two times until it ext both
            base.OnTriggerEnterCallback(other, trigger);
        }
 protected override void OnTriggerExitCallback(Collider other, InteractableInRangeTrigger trigger)
 {
     base.OnTriggerExitCallback(other, trigger);
 }