public void InvokeStateExited(AnimatorStateInfo stateInfo, int layerIndex) { StateExited?.Invoke(this, new MonoAnimatorStateEventHandler { LayerIndex = layerIndex, AnimatorStateInfo = stateInfo }); }
/// <summary> /// Forward the State's Exited event through this Machine's StateExited event. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> protected override void HandleStateExited(object sender, StateExitedEventArgs args) { if (StateExited == null) { return; } try { var exitedArgs = args.ToStateExitedArgs <TState>(); Logger.Debug($"{Name}: raising '{nameof(StateExited)}' event with {exitedArgs.State}."); StateExited?.Invoke(this, exitedArgs); } catch (Exception ex) { Logger.Error($"{ex.GetType().Name} during '{nameof(StateExited)}' event from {Name} state machine.", ex); } }
public void ExitedState(int stateHash) => StateExited?.Invoke(StateFor(stateHash));
public void Exit() { _exit(); StateExited?.Invoke(this, new EventArgs()); }
/// <summary> /// Exit state /// </summary> public void ExitFinish() { StateExited?.Invoke(this, EventArgs.Empty); }
public virtual void OnStateExit() { StateExited?.Invoke(); }