private void FireProjectile(Point target) { WeaponProjectile projectile = Magazine.Dequeue(); Game.AddGameObject(projectile); if (ProjectilesLeftAnimation != null) { ProjectilesLeftAnimation.Start(); } }
protected override void Reload() { float deltaTime = Game.DeltaTime; reloadTicks++; if ((reloadTicks * deltaTime) >= ReloadInterval) { Magazine.Enqueue(new TankMissileLauncherMissile(Game, this)); reloadTicks = 0; ProjectilesLeftAnimation.Start(); } }
protected override void Reload() { if (!Reloading) { Reloading = true; } reloadCounter++; if (reloadCounter * Game.DeltaTime > ReloadInterval) { for (int i = 0; i < MagazineSize; i++) { magazine.Enqueue(new TankMachineGunBullet(Game, this)); } Reloading = false; ProjectilesLeftAnimation.Start(); reloadCounter = 0; } }