public void SequenceStart() { if (SequenceSafety.GetInstace().isRunning) { return; } StartCoroutine(StartSequenceCoroutine()); }
private IEnumerator StartSequenceCoroutine() { SequenceSafety.GetInstace().isRunning = true; foreach (var s in sequences) { s.sequence.OnBeginSequence?.Invoke(); yield return(StartCoroutine(s.sequence.Activate())); s.sequence.OnEndSequence?.Invoke(); } SequenceSafety.GetInstace().isRunning = false; }