Skip to content

Instantly share code, notes, and snippets.

@AlexJWayne
Created March 9, 2009 05:25
Show Gist options
  • Save AlexJWayne/76121 to your computer and use it in GitHub Desktop.
Save AlexJWayne/76121 to your computer and use it in GitHub Desktop.
if (nebula.armorRegen > 0 || nebula.shieldRegen > 0) {
// positive nebula
currentShields += nebula.shieldRegen;
currentArmor += nebula.armorRegen;
if (currentArmor > maxArmor && currentArmor > 0.0) currentArmor = maxArmor;
if (currentShields > maxShields) currentShields = maxShields;
} else {
// negative nebula
[self damageShields:-nebula.shieldRegen armor:-nebula.armorRegen];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment