Exemple #1
0
 IEnumerator <float> StartWaitForPrevious(InteractFXEvent _previousEvent, GameObject _sender = null, GameObject _receiver = null)
 {
     while (!_previousEvent.IsFinished)
     {
         yield return(Timing.WaitForOneFrame);
     }
     DoFX(_sender, _receiver);
 }
 void DoFXList(GameObject _sender = null, GameObject _receiver = null)
 {
     for (int i = 0; i < fxEvents.Count; i++)
     {
         InteractFXEvent prev = null;
         if (i > 0)
         {
             prev = fxEvents[i - 1];
         }
         fxEvents[i].DoFXEvent(prev, _sender, _receiver);
     }
 }
Exemple #3
0
 public void DoFXEvent(InteractFXEvent _previousEvent = null, GameObject _sender = null, GameObject _receiver = null)
 {
     if (startType == StartType.Instant)
     {
         DoFX(_sender, _receiver);
     }
     else if (_previousEvent != null)
     {
         Timing.RunCoroutine(StartWaitForPrevious(_previousEvent, _sender, _receiver));
     }
     else
     {
         Debug.LogError("Could start event!");
     }
 }