public void Begin() { if (_queue.Count > 0) { _current = _queue.Dequeue(); _current.OnEnded += OnCurrentEnded; _current.OnKilled += OnCurrentKilled; _current.Begin(); } OnBegan.Execute(this); }
private void OnCurrentEnded(IQueueable obj) { _current.OnKilled -= OnCurrentKilled; _current.OnEnded -= OnCurrentEnded; if (_queue.Count > 0) { _current = _queue.Dequeue(); _current.OnEnded += OnCurrentEnded; _current.OnKilled += OnCurrentKilled; _current.Begin(); } else { OnEnded.Execute(this); } }