示例#1
0
 public void IsAttacking(bool IsAttacking)
 {
     if (IsAttacking)
     {
         PlayerControllerStateMachine.Fighting(this);
     }
     else
     {
         PlayerControllerStateMachine.Patrolling(this);
     }
 }
示例#2
0
    private protected override void Start()
    {
        base.Start();

        PlayerPresenter = (PlayerPresenter)CharacterPresenter;
        joystick        = PlayerPresenter.PlayerUIPresenter.PlayerJoystick;
        attackButton    = PlayerPresenter.PlayerUIPresenter.PlayerAttackButton;
        attackButton.OnPressingAttackButton += IsAttacking;


        PlayerStatePatrolling = GetComponent <PlayerStatePatrolling>();
        PlayerStateFighting   = GetComponent <PlayerStateFighting>();

        PlayerControllerStateMachine = PlayerStatePatrolling;
        PlayerControllerStateMachine.Patrolling(this);
    }