Esempio n. 1
0
 void ManageAttacks(InputInfo inputInfo)
 {
     if (inputInfo.GetAttackInput())
     {
         playerAttack.Attack(inputInfo.GetLastMovementKeyPressed());
     }
 }
Esempio n. 2
0
    void Update()
    {
        InputInfo inputInfo = new InputInfo(previousLastMovementKeyPressed);

        ManageWalk(inputInfo);
        ManageAnimations(inputInfo);
        ManageAttacks(inputInfo);

        previousLastMovementKeyPressed = inputInfo.GetLastMovementKeyPressed();
    }