public override void OnFirstUpdate(Microsoft.Xna.Framework.GameTime gameTime) { base.OnFirstUpdate(gameTime); duplicateCooldown.Reset(DuplicateCooldownMs); if (Count > 1) { originalClone = (MultiBullet)this.Clone(); } }
public override void Update(GameTime gameTime) { base.Update(gameTime); if (!hadOneFullUpdate) { hadOneFullUpdate = true; return; } duplicateCooldown.Update(gameTime.ElapsedGameTime.TotalMilliseconds); if (duplicateCooldown.IsElapsed && Count > 1) { var c = this.originalClone; this.originalClone = null; this.Count = 0; c.Count--; Game.Objects.Add(c); c.GeneralDirection += DegIncrement; } }