Exemplo n.º 1
0
    public void SendToEvent(int callEvent)
    {
        try
        {
            switch (eventNumber)
            {
            case 1:
                break;

            case 2:
                eventTwo.SetMessages(callEvent);
                break;

            case 3:
                eventThree.SetEvent(callEvent);
                break;

            case 4:
                eventFour.SetEvent(callEvent);
                break;

            case 5:
                eventFive.SetEvent(callEvent);
                break;

            case 6:
                eventSix.SetEvent(callEvent);
                break;
            }
        }
        catch (NullReferenceException ex)
        {
            Debug.LogWarning("Event " + eventNumber + " not found > " + ex.Message);
        }
    }
Exemplo n.º 2
0
 void Update()
 {
     if (m_Active)
     {
         m_Count += Time.deltaTime;
         if (m_Count > m_FocusTime)
         {
             m_CameraFollow.SetPlayerAsTarget();
             m_Bars.SetBool("isActive", false);
             m_Active = false;
             m_Event.SetMessages(m_CallEvent);
             if (m_DesactivateTrigger)
             {
                 GetComponent <BoxCollider>().enabled = false;
             }
         }
     }
 }
Exemplo n.º 3
0
 private void OnTriggerEnter()
 {
     m_Event.SetMessages(m_EventNumber);
     GetComponent <BoxCollider>().enabled = false;
 }