Пример #1
0
        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;
        }
Пример #2
0
        public WorldMenu(Simulator simulator, double visualPriority, Dictionary<string, LevelDescriptor> availableLevels, Color color)
        {
            Simulator = simulator;
            VisualPriority = visualPriority;
            AvailableLevels = availableLevels;

            AlternateSelectedText = color == Colors.Spaceship.Yellow;


            PausedGameChoices = new List<ContextualMenuChoice>()
            {
                new TextContextualMenuChoice("resume", new Text("resume game", @"Pixelite") { SizeX = 2 }),
                new TextContextualMenuChoice("new", new Text("new game", @"Pixelite") { SizeX = 2 })
            };

            PausedGameMenu = new ContextualMenu(simulator, visualPriority, color, PausedGameChoices, 15);

            Title = new Text(@"Pixelite")
            {
                SizeX = 3,
                VisualPriority = VisualPriorities.Default.LevelNumber,
                Alpha = 200
            };

            Difficulty = new Text(@"Pixelite")
            {
                SizeX = 3,
                VisualPriority = VisualPriorities.Default.LevelNumber,
                Alpha = 200
            };

            Highscore = new Text(@"Pixelite")
            {
                SizeX = 2,
                VisualPriority = VisualPriorities.Default.LevelHighScore,
                Alpha = 200
            };

            Stars = new ScoreStars(Simulator.Scene, 0, VisualPriorities.Default.LevelHighScore).CenterIt();

            PausedGameMenuCheckedIn = false;
        }