public static void UpdateAll(GameTime gameTime) { for (int i = 0; i < RtsBullets.Count; i++) { RtsBullet b = RtsBullets[i]; if (b.Update(gameTime)) { i--; } } }
void performAttackIfStarted(AttackCommand command) { if (attackStarted) { if (timeSinceLastAttack >= initialAttackDelay) { attackStarted = false; RtsBullet b = new RtsBullet(this, command.Target, centerPoint, 5, 150); b.Texture = BulletTexture; } } }