public PlayerCash(Simulator simulator, CommonStash stash) { Simulator = simulator; Stash = stash; Cash = new Text(Stash.Cash.ToString(), @"Pixelite") { SizeX = 2, VisualPriority = VisualPriorities.Default.PlayerCash }; }
public GameEndedBubble(CommanderScene scene, double visualPriority, string quote, Color quoteColor, CommonStash commonStash, int nbStars) : base(scene, new PhysicalRectangle(), visualPriority) { DistanceY = 45; Quote = new Text(quote, @"Pixelite") { SizeX = 2, Color = quoteColor, VisualPriority = visualPriority - 0.00001 }; Stars = new ScoreStars(Scene, nbStars, visualPriority - 0.00001); Score = new ScoreCalculation(Scene, commonStash.TotalCash, commonStash.TotalLives, commonStash.TotalTime, (commonStash.TotalScore * 100) / commonStash.PotentialScore, visualPriority - 0.00001); ComputeSize(); PreviousLayoutId = -1; }
public void Initialize() { Id = Descriptor.Infos.Id; Mission = Descriptor.Infos.Mission; Difficulty = Descriptor.Infos.Difficulty; ParTime = Descriptor.ParTime; Background = new Image(Descriptor.Infos.Background, Vector3.Zero); Background.VisualPriority = Preferences.PrioriteFondEcran; InitializePlanetarySystem(); InitializeTurrets(); InitializeWaves(); InitializeSpaceship(); InitializeAvailableTurrets(); InitializeAvailablePowerUps(); for (int i = 0; i < PlanetarySystem.Count; i++) if (PlanetarySystem[i].PathPriority == Descriptor.Objective.CelestialBodyToProtect) { CelestialBodyToProtect = PlanetarySystem[i]; break; } if (CelestialBodyToProtect != null) CelestialBodyToProtect.LifePoints = Descriptor.Player.Lives; CommonStash = new CommonStash() { Lives = Descriptor.Player.Lives, Cash = Descriptor.Player.Money, StartingPosition = Descriptor.Player.StartingPosition }; Minerals = Descriptor.Minerals.Cash; LifePacks = Descriptor.Minerals.LifePacks; HelpTexts = Descriptor.HelpTexts; SaveBulletDamage = false; }
public void DoCommonStashChanged(CommonStash stash) { //GameMenu.Score = stash.TotalScore; GameMenu.Cash = stash.Cash; GameMenu.Lives = stash.Lives; GameBarPanel.Cash = stash.Cash; GameBarPanel.Lives = stash.Lives; }
private void NotifyCommonStashChanged(CommonStash stash) { if (CommonStashChanged != null) CommonStashChanged(stash); }