コード例 #1
0
 private void Next(params object[] args)
 {
     _list[_index++].OnStop();
     OnElementChanging?.Invoke();
     _list[_index].OnStart(args);
     OnStartWorking?.Invoke();
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 public override void Interact(Interactor interactor)
 {
     if (_isWorking)
     {
         return;
     }
     base.Interact(interactor);
     _material.color = workingColor;
     OnStartWorking?.Invoke();
     if (_hasTurnableAnimator)
     {
         turnableAnimator.SetTrigger(StartWorkingTrigger);
     }
     CalculateBreakingTime();
 }