Example #1
0
 // Use this for initialization
 private void OnEnable()
 {
     if (eventSequence.Length > 0)
     {
         if (eventSequence.Length > 0 &&
             !string.IsNullOrEmpty(eventSequence[0].TriggerEventIn) &&
             eventSequence[0].EnableStep)
         {
             VRsqr_EventsManager.StartListening(VRsqr_EventsManager.StandardizeString(eventSequence[eventInd].TriggerEventIn), NextEventHandler);
         }
     }
 }
Example #2
0
    void NextEvent()
    {
        // trigger the sequence of events, until the sequence requires waiting for an event to continue triggering it
        while (eventSequence.Length > eventInd)
        {
            if (eventSequence[eventInd].EnableStep)
            {
                eventSequence[eventInd].eventOut.trigger();
            }

            eventInd++;

            // Next event in sequence is pending an event to trigger it
            if (eventSequence.Length > eventInd &&
                !string.IsNullOrEmpty(eventSequence[eventInd].TriggerEventIn) &&
                eventSequence[eventInd].EnableStep)
            {
                VRsqr_EventsManager.StartListening(VRsqr_EventsManager.StandardizeString(eventSequence[eventInd].TriggerEventIn), NextEventHandler);
                break;
            }
        }
    }