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; }
/// <summary> /// Handle visual changes that occur when the behaviour of the pawn changes /// </summary> /// <param name="state"></param> protected abstract void HandlePawnBehaviour(EPawnBehaviour state);
/// <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); }