Exemple #1
0
    void Update()
    {
        if (Inventory.CurrentGear == GearEnum.SonicHose){
            if (LastGear != GearEnum.SonicHose)
                EquipSonicHose();
            if (Input.GetButtonDown (Controls.FightFire) && batteryPower > minBatteryPowerToEngage)
                StartCoroutine ( EngageSonicHose() );
        }
        else if (LastGear == GearEnum.SonicHose && Inventory.CurrentGear != GearEnum.SonicHose)
            StartCoroutine( PutAwaySonicHose() );

        LastGear = Inventory.CurrentGear;
    }
Exemple #2
0
 void Update()
 {
     if (Inventory.CurrentGear==GearEnum.SonicHose){
         if (LastGear!=GearEnum.SonicHose){
             EquipSonicHose();
         }
         if (Input.GetButtonDown (Controls.FightFire) && batteryPower>0.33f){
             StartCoroutine ( Sonicate() );
         }
     }
     else if (LastGear==GearEnum.SonicHose && Inventory.CurrentGear !=GearEnum.SonicHose){
         StartCoroutine( PutAwaySonicHose() );
     }
     LastGear = Inventory.CurrentGear;
 }