public void DoPowerUpStarted(PowerUp powerUp, SimPlayer player) { switch (powerUp.Type) { case PowerUpType.Collector: DoAddSpaceshipAsked(((PowerUpCollector) powerUp).Collector); break; case PowerUpType.Spaceship: DoAddSpaceshipAsked(((PowerUpSpaceship) powerUp).SpaceshipSpaceship); break; case PowerUpType.Miner: DoAddSpaceshipAsked(((PowerUpMiner) powerUp).Miner); break; case PowerUpType.AutomaticCollector: DoAddSpaceshipAsked(((PowerUpAutomaticCollector) powerUp).AutomaticCollector); break; } }
public void DoPowerUpStopped(PowerUp powerUp, SimPlayer p) { var player = Players[p]; if (powerUp.NeedInput) { player.Cursor.FadeIn(); player.PowerUpInputMode = false; if (powerUp.Crosshair != "") player.Crosshair.FadeOut(); if (powerUp.Type == PowerUpType.FinalSolution) { PowerUpLastSolution pls = (PowerUpLastSolution) powerUp; if (pls.GoAhead) PathPreviewing.Commit(player); player.PowerUpFinalSolution = false; } } }
public void DoPowerUpStarted(PowerUp powerUp, SimPlayer p) { var player = Players[p]; if (powerUp.NeedInput) { player.Cursor.FadeOut(); player.PowerUpInputMode = true; if (powerUp.Crosshair != "") { player.Crosshair.SetFrontImage(powerUp.Crosshair, powerUp.CrosshairSize, p.Color); player.Crosshair.Alpha = 0; player.Crosshair.FadeIn(); } if (powerUp.Type == PowerUpType.FinalSolution) player.PowerUpFinalSolution = true; } }
public void DoPowerUpStopped(PowerUp powerUp, SimPlayer p) { if (powerUp.NeedInput) { p.Position = powerUp.Position; NotifyPlayerMoved(p); } if (powerUp.Type == PowerUpType.FinalSolution && ((PowerUpLastSolution) powerUp).GoAhead) DoPowerUpUse(p); p.UpdateSelection(); }
public void DoPowerUpStarted(PowerUp powerUp, SimPlayer p) { if (powerUp.Type == PowerUpType.FinalSolution) ((PowerUpLastSolution) powerUp).Selection = p.ActualSelection; p.UpdateSelection(); }
public void DoPowerUpInputPressed(PowerUp powerUp, SimPlayer player) { if (powerUp.Type == PowerUpType.RailGun) XACTAudio.PlayCue("SilentCue" /*"sfxRailGunCharging"*/, "Sound Bank"); }
private void NotifyPowerUpStopped(PowerUp powerUp, SimPlayer player) { if (PowerUpStopped != null) PowerUpStopped(powerUp, player); }
private void InitializeImagesPowerUps(int index, PowerUp p) { Vector3 gridPosition = new Vector3(index % (int) PowerUpsLayout.X, index / (int) PowerUpsLayout.Y, 0); Vector3 position = this.Position + gridPosition * DistanceBetweenTwoChoices - new Vector3(300, 75, 0); p.BuyPosition = this.Position + gridPosition * DistanceBetweenTwoChoices; Image image = new Image(p.BuyImage) { VisualPriority = this.VisualPriority + 0.003f, SizeX = ImageSize, Position = position }; ImagesPowerUpsBuy.Add(p.Type, image); Image placeHolder = new Image("powerUpPlaceHolder") { VisualPriority = this.VisualPriority + 0.004f, SizeX = ImageSize, Position = position }; ImagesPlaceHolders.Add(p.Type, placeHolder); }
public void DoPowerUpStopped(PowerUp powerUp, SimPlayer player) { XACTAudio.PlayCue("SilentCue" /*powerUp.SfxOut*/, "Sound Bank"); }
public void DoPowerUpStopped(PowerUp powerUp, SimPlayer player) { //todo }
public void DoPowerUpStopped(PowerUp powerUp, SimPlayer player) { if (powerUp.Type != PowerUpType.FinalSolution) return; PowerUpLastSolution p = (PowerUpLastSolution) powerUp; if (!p.GoAhead) return; p.CelestialBody.ZoneImpactDestruction = p.ZoneImpactDestruction; p.CelestialBody.AttackPoints = p.AttackPoints; p.CelestialBody.LifePoints = 0; }
public void DoPowerUpStarted(PowerUp powerUp, SimPlayer player) { if (powerUp.Type == PowerUpType.Pulse) ((PowerUpPulse) powerUp).Path = Path; if (powerUp.Type == PowerUpType.DarkSide) foreach (var c in CelestialBodies) c.DarkSide = true; if (powerUp.Type == PowerUpType.DeadlyShootingStars) { DeadlyShootingStars = true; Vector3 newColor = Color.Red.ToVector3(); Vector4 newColor2 = Color.Red.ToVector4(); var stars = Stars.Model[0]; stars.ReleaseColour = newColor; for (int i = 0; i < stars.ActiveParticlesCount; i++) { var star = stars.Particles[i]; star.Colour = newColor2; var effect = Simulator.Scene.Particles.Get(@"starExplosion"); effect.Model[0].ReleaseColour = newColor; effect.Trigger(ref star.Position); effect.VisualPriority = Preferences.PrioriteFondEcran - 0.00001f; Simulator.Scene.Particles.Return(effect); } } }
public void DoPowerUpStarted(PowerUp powerUp, SimPlayer player) { if (powerUp is PowerUpDeadlyShootingStars) ObjectsCollisions.DeadlyShootingStars = true; else if (powerUp is PowerUpDarkSide) ObjectsCollisions.DarkSide = true; }
private void NotifyPowerUpInputPressed(PowerUp powerUp, SimPlayer player) { if (PowerUpInputPressed != null) PowerUpInputPressed(powerUp, player); }
public void DoPowerUpStarted(PowerUp powerUp, SimPlayer player) { if (powerUp.Type == PowerUpType.Pulse) Bullets.Add(((PowerUpPulse) powerUp).Bullet); else if (powerUp.Type == PowerUpType.Shield) Bullets.Add(((PowerUpShield) powerUp).Bullet); }
public void DoPowerUpInputCanceled(PowerUp powerUp, SimPlayer player) { }
public void DoPowerUpStopped(PowerUp powerUp, SimPlayer player) { if (powerUp.Type == PowerUpType.Pulse) ((PowerUpPulse) powerUp).Bullet.LifePoints = 0; else if (powerUp.Type == PowerUpType.Shield) ((PowerUpShield) powerUp).Bullet.LifePoints = 0; }
public void DoPowerUpInputReleased(PowerUp powerUp, SimPlayer player) { if (powerUp.Type == PowerUpType.Miner) XACTAudio.PlayCue("SilentCue" /*"sfxMineGround"*/, "Sound Bank"); }
private void InitializeTurretsPowerUps(PowerUp p) { if (p.Type == PowerUpType.RailGun) { RailGunTurret rgt = new RailGunTurret(Simulator) { Position = HumanBattleship.Position + new Vector3(130, 30, 0), VisualPriority = this.VisualPriority + 0.004f, PlayerControlled = true, UpdatePosition = false, Watcher = false, TimeLastBullet = double.MaxValue, RangeAlpha = 0, ShowRange = false, ShowForm = false }; p.BuyPosition = rgt.Position + new Vector3(300, 75, 0); HumanBattleship.RailGun = rgt; Turrets.Add(rgt); ImagesTurretsPowerUps.Add(p.Type, rgt); } }
public void DoPowerUpStarted(PowerUp powerUp, SimPlayer player) { if (powerUp.Type == PowerUpType.Shield) { ((PowerUpShield) powerUp).ToProtect = CelestialBodyToProtect; ((PowerUpShield) powerUp).Bullet.Position = CelestialBodyToProtect.Position; } }