示例#1
0
 private void ResolveState()
 {
     _isInteractable = PawnControl.IsInteractable;
     _lastHoverEvent = HoverableProvider.LastHoverableEvent;
     _pawnState      = PawnControl.PawnState;
     _pawnBehaviour  = PawnControl.PawnBehaviour;
 }
 protected override void HandlePawnBehaviour(EPawnBehaviour behaviour)
 {
     if (_pawnBehaviour == behaviour)
     {
         return;
     }
     _pawnBehaviour = behaviour;
     _isAnimatorChangedSinceLastFrame = true;
 }
示例#3
0
 /// <summary>
 /// Handle visual changes that occur when the behaviour of the pawn changes
 /// </summary>
 /// <param name="state"></param>
 protected abstract void HandlePawnBehaviour(EPawnBehaviour state);
示例#4
0
 /// <summary>
 /// Set the behaviour of the current pawn
 /// </summary>
 /// <param name="behaviour"></param>
 public void SetPawnBehaviour(EPawnBehaviour behaviour)
 {
     _behaviour     = behaviour;
     _pawnBehaviour = behaviour;
     _onPawnBehaviour.Invoke(_behaviour);
 }