コード例 #1
0
 public void InvokeStateExited(AnimatorStateInfo stateInfo, int layerIndex)
 {
     StateExited?.Invoke(this, new MonoAnimatorStateEventHandler
     {
         LayerIndex        = layerIndex,
         AnimatorStateInfo = stateInfo
     });
 }
コード例 #2
0
        /// <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);
            }
        }
コード例 #3
0
 public void ExitedState(int stateHash) =>
 StateExited?.Invoke(StateFor(stateHash));
コード例 #4
0
 public void Exit()
 {
     _exit();
     StateExited?.Invoke(this, new EventArgs());
 }
コード例 #5
0
 /// <summary>
 /// Exit state
 /// </summary>
 public void ExitFinish()
 {
     StateExited?.Invoke(this, EventArgs.Empty);
 }
コード例 #6
0
 public virtual void OnStateExit()
 {
     StateExited?.Invoke();
 }