private void ProcessWeaponToggle()
 {
     if (ControllerInput.GetVerticalButtonsDown(out int v))
     {
         weapons.CycleWeapon(v);
     }
     if (ControllerInput.GetHorizontalButtonsDown(out int h))
     {
         abilities.CycleAbilities(h);
     }
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        weapon = GetComponent <WeaponSystem>();

        // Record the current weaponIndex
        oldWeaponIndex = weapon.weaponIndex;

        Debug.Log(weapon.weaponIndex);

        // Cycle the weapon
        weapon.CycleWeapon(-1);

        Debug.Log(weapon.weaponIndex);
    }