Beispiel #1
0
 public void HandleWeaponSwapInput(PlayerInputScript pi)
 {
     nextWeaponInput = pi.GetNextWeaponInput();
     prevWeaponInput = pi.GetPrevWeaponInput();
     if (nextWeaponInput == 0f)
     {
         canSwapNext = true;
     }
     if (prevWeaponInput == 0f)
     {
         canSwapPrev = true;
     }
     if (nextWeaponInput > 0f && canSwapNext)
     {
         canSwapNext = false;
         Debug.Log("Calling playerscript to ask the weapon script to swap to the next!");
     }
     else if (prevWeaponInput > 0f && canSwapPrev)
     {
         canSwapPrev = false;
         Debug.Log("Calling playerscript to ask the weapon script to swap to the prev!");
     }
 }