private void Next(params object[] args) { _list[_index++].OnStop(); OnElementChanging?.Invoke(); _list[_index].OnStart(args); OnStartWorking?.Invoke(); }
public void Launch(int index) { if (_list.Count == 0) { throw new StateManagerException("List array can't be empty"); } _index = index; _list[_index].OnStart(); OnStartWorking?.Invoke(); _running = RunningState.Running; }
public override void Interact(Interactor interactor) { if (_isWorking) { return; } base.Interact(interactor); _material.color = workingColor; OnStartWorking?.Invoke(); if (_hasTurnableAnimator) { turnableAnimator.SetTrigger(StartWorkingTrigger); } CalculateBreakingTime(); }