Exemple #1
0
 void GetActionBatInput()
 {
     if (Input.GetKeyDown(KeyCode.Alpha1))
     {
         if (_inventory.HasItemWithTagInInventory(GameManager_References.wheelsTag))
             _stateChanger.ChangeMovementMode(
                 _stateChanger.playerController.GetMovementType() == Player_Controller.MovementType.MOVE_WHEEL ?
                 Player_Controller.MovementType.MOVE_WALK : Player_Controller.MovementType.MOVE_WHEEL);
         //add transitionsound
         else
         {
             Debug.Log("You haven't unlocked wheels yet");
         }
     }
     else if (Input.GetKeyDown(KeyCode.Alpha4))
     {
         if (_inventory.RemovePowerupFromInventory(true))
         {
             Debug.Log("Battery consume");
             _hudModel.UseConsumable(GameManager_References.batteryTag);
             Game_Manager.Instance.GetSoundManager().PlaySoundForPlayer(Player_SoundHolder.useItemSound);
         }
         else
             Debug.Log("You don't have any battery");
     }
     else if (Input.GetKeyDown(KeyCode.Alpha5))
     {
         if (_inventory.RemovePowerupFromInventory(false))
         {
             Debug.Log("Fuel consumed");
             _hudModel.UseConsumable(GameManager_References.fuelTag);
             Game_Manager.Instance.GetSoundManager().PlaySoundForPlayer(Player_SoundHolder.useItemSound);
         }
         else
             Debug.Log("You don't have any fuel");
     }
 }