public static SendSeqData Wait(float waitTime, bool realtime = false, SendSeqData sendSeqData = null) { if (sendSeqData == null) { sendSeqData = new SendSeqData(); } sendSeqData.Coroutines.Add(WaitCoroutine(waitTime, realtime)); return(sendSeqData); }
/// <summary> Send EzMsg with Timer/Chaining capability. Eg.: /// EzMsg.Send<IArmor>(col, _=>_.ApplyDamage, true) /// .Wait(0.5f).Send<IWeapon>(gameObject, _=>_.Reload); /// </summary> public static SendSeqData Send <T>(GameObject target, EventAction <T> functor, bool sendToChildren = false, SendSeqData sendSeqData = null) where T : IEventSystemHandler { if (sendSeqData == null) { sendSeqData = new SendSeqData(); } sendSeqData.Coroutines.Add(ExecuteRecursive(target, functor, sendToChildren)); return(sendSeqData); }
/// <summary> [Extension] Send EzMsg with Timer/Chaining capability. Eg.: /// EzMsg.Send<IArmor>(col, _=>_.ApplyDamage, true) /// .Wait(0.5f).Send<IWeapon>(gameObject, _=>_.Reload); /// </summary> public static SendSeqData Send <T>(this SendSeqData sendSeqData, GameObject target, EventAction <T> functor, bool sendToChildren = false) where T : IEventSystemHandler { return(Send(target, functor, sendToChildren, sendSeqData)); }
/// <summary> [Extension] Wait the given amount of seconds before proceeding the Sequence Data </summary> /// <param name="sendSeqData"></param> /// <param name="waitTime">Time to wait, in seconds</param> /// <param name="realtime">Ignores Time.TimeScale</param> public static SendSeqData Wait(this SendSeqData sendSeqData, float waitTime, bool realtime = false) { return(Wait(waitTime, realtime, sendSeqData)); }