fn upgrade_water2(&mut self, cash: &mut i32) {
        if *cash >= self.upgrade_cost {
            self.top_img = String::from("SuperSoakerTop");
            self.blast_img = String::from("SuperSoakerBlast");
            self.variant = TowerType::WaterGun(WaterGun::SuperSoaker);
            self.range *= 1.2;
            self.dmg += 5;
            self.dmg_interval *= 0.5;
            *cash -= self.upgrade_cost;
            self.upgrade_cost += 10;
        }
    }
/// Upgrade the tower to a Super Soaker
Upgrade the tower to a Super Soaker
Upgrade the tower to a Super Soaker
fn upgrade_water2(&mut self, cash: &mut i32) {
        if *cash >= self.upgrade_cost {
            self.top_img = String::from("SuperSoakerTop");
            self.blast_img = String::from("SuperSoakerBlast");
            self.variant = TowerType::WaterGun(WaterGun::SuperSoaker);
            self.range *= 1.2;
            self.dmg += 5;
            self.dmg_interval *= 0.5;
            *cash -= self.upgrade_cost;
            self.upgrade_cost += 10;
        }
    }
fn upgrade_water2 ( & mut self , cash : & mut i32 ) { if * cash >= self . upgrade_cost { self . top_img = String :: from ( " " ) ; self . blast_img = String :: from ( " " ) ; self . variant = TowerType :: WaterGun ( WaterGun :: SuperSoaker ) ; self . range *= 1.2 ; self . dmg += 5 ; self . dmg_interval *= 0.5 ; * cash -= self . upgrade_cost ; self . upgrade_cost += 10 ; } }
Upgrade the tower to a Super Soaker
Upgrade the tower to a Super Soaker
&mut self
cash
&mut i32
&mut self
cash
&mut i32