void WeaponGroup::CheckAmmo() { ammo = 0; mass = 0.0f; resist = 0.0f; ListIter<Weapon> iter = weapons; while (++iter) { Weapon* w = iter.value(); ammo += w->Ammo(); mass += w->Mass(); resist += w->Resistance(); } }
void WeaponGroup::ExecFrame(double seconds) { ammo = 0; mass = 0.0f; resist = 0.0f; ListIter<Weapon> iter = weapons; while (++iter) { Weapon* w = iter.value(); w->ExecFrame(seconds); ammo += w->Ammo(); mass += w->Mass(); resist += w->Resistance(); } }