Ejemplo n.º 1
0
 public void IsAttacking(bool IsAttacking)
 {
     if (IsAttacking)
     {
         PlayerControllerStateMachine.Fighting(this);
     }
     else
     {
         PlayerControllerStateMachine.Patrolling(this);
     }
 }
Ejemplo n.º 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);
    }