Esempio n. 1
0
 public PushButton(Text label)
     : this()
 {
     Label = label;
     MinSpaceForValue = 300;
     MaxSpaceForValue = 400;
 }
        public ChoicesHorizontalSlider(string label, List<string> choices, int startingIndex)
        {
            Choices = choices;
            ChoiceIndex = startingIndex;

            DecrementRep = new Image("WidgetNext") { Origin = Vector2.Zero, Effect = SpriteEffects.FlipHorizontally, SizeX = 4 };
            IncrementRep = new Image("WidgetNext") { Origin = Vector2.Zero, SizeX = 4 };

            ValueText = new Text(Choices[ChoiceIndex], @"Pixelite") { SizeX = 2 };
            Label = new Text(label, @"Pixelite") { SizeX = 2 };

            LongestChoice = new Text(@"Pixelite") { SizeX = 2 };

            foreach (var choice in Choices)
            {
                if (choice.Length > LongestChoice.Data.Length)
                    LongestChoice.Data = choice;
            }

            DecrementCircle = new Circle(Vector3.Zero, DecrementRep.AbsoluteSize.X / 2);
            IncrementCircle = new Circle(Vector3.Zero, IncrementRep.AbsoluteSize.X / 2);

            SpaceForLabel = 200;
            SpaceForValue = 200;
        }
Esempio n. 3
0
        public WarningScene() :
            base("Warning")
        {
            ClearColor = Color.White;

            Continue = new Text(
                Preferences.Target == Core.Utilities.Setting.Xbox360 ?
                "Press a button to continue." :
                "Click a mouse button to continue.", "Pixelite", new Vector3(0, 270, 0))
                {
                    Color = new Color(255, 7, 106),
                    SizeX = 3
                }.CenterIt();

            Warning = new Text(Message, "Pixelite")
            {
                SizeX = 2,
                Color = Color.Black,
                VisualPriority = 0.5
            }.CenterIt();

            Background = new Image("WhiteBg", Vector3.Zero)
            {
                VisualPriority = 1,
                Color = new Color(Main.Random.Next(220, 255), Main.Random.Next(220, 255), Main.Random.Next(220, 255))
            };
        }
Esempio n. 4
0
        public NewsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color, NewsType type, string title)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle(title);
            Type = type;
            DistanceBetweenTwoChoices = 30;

            Alpha = 0;

            AllNews = new List<NewsWidget>();

            Sync = new PushButton(new Text("Reload", @"Pixelite") { SizeX = 2 });
            Sync.ClickHandler = DoReloadClicked;

            var vwText = new Text("Visit website", @"Pixelite") { SizeX = 2 };
            VisitWebsite = new PushButton(vwText) { MinSpaceForValue = (int) vwText.AbsoluteSize.X + 20 };
            VisitWebsite.ClickHandler = DoVisitWebsiteClicked;

            AddTitleBarWidget(VisitWebsite);

            LoadingInfos = new Label(new Text(@"Pixelite") { SizeX = 4 });

            Main.NewsController.LoadingStarted += new NewsTypeHandler(DoLoadingStarted);
            Main.NewsController.LoadingDoneSuccessfully += new NewsTypeNewsHandler(DoLoadedSuccessfully);
            Main.NewsController.LoadingDoneWithError += new NewsTypeHandler(DoLoadedError);

            MaxNewsDisplayed = 3;
        }
Esempio n. 5
0
        public LogoAnimation(Scene scene)
        {
            Scene = scene;

            Logo = new Text("Ephemere Games", @"Pixelite")
            {
                Alpha = 0,
                VisualPriority = VisualPriorities.Cutscenes.IntroLogo,
                SizeX = 6
            };
            Logo.CenterIt();

            Presents = new Text("Presents", @"Pixelite", new Vector3(0, 60, 0))
            {
                Alpha = 0,
                VisualPriority = VisualPriorities.Cutscenes.IntroLogo,
                SizeX = 4
            };
            Presents.CenterIt();

            TimeIn = IntroCutscene.Timing["LogoIn"];

            Scene.VisualEffects.Add(Logo, Core.Visual.VisualEffects.FadeInFrom0(255, TimeIn, 2000));
            Scene.VisualEffects.Add(Logo, Core.Visual.VisualEffects.FadeOutTo0(255, TimeIn + 3000, 1000));
            Scene.VisualEffects.Add(Logo, Core.Visual.VisualEffects.ChangeSize(6f, 7f, TimeIn, 10000));

            Scene.VisualEffects.Add(Presents, Core.Visual.VisualEffects.FadeInFrom0(255, TimeIn + 1000, 2000));
            Scene.VisualEffects.Add(Presents, Core.Visual.VisualEffects.FadeOutTo0(255, TimeIn + 3000, 1000));
            Scene.VisualEffects.Add(Presents, Core.Visual.VisualEffects.ChangeSize(4f, 5f, TimeIn, 10000));
        }
Esempio n. 6
0
        public void Initialize()
        {
            // Level numbers
            foreach (var level in Descriptor.Levels)
            {
                var cb = CelestialBodies[level.Key];

                LevelsNumbers.Add(level.Key, new Text(LevelsDescriptors[cb.Name].Infos.Mission, @"Pixelite")
                {
                    SizeX = 3,
                    VisualPriority = cb.VisualPriority + 0.00001,
                    Alpha = 150
                }.CenterIt());
            }

            // Lock state
            foreach (var level in Descriptor.Levels)
            {
                LevelUnlockedStates.Add(level.Key, false);
                LockedTexts.Add(level.Key, new Text("Locked", @"Pixelite")
                {
                    SizeX = 2,
                    Alpha = LockedMaxAlpha,
                    VisualPriority = VisualPriorities.Default.LevelLocked
                }.CenterIt());
            }

            GamePausedText = new Text("Paused", @"Pixelite")
            {
                SizeX = 2,
                Color = Colors.Default.GamePaused,
                Alpha = GamePausedMaxAlpha,
                VisualPriority = VisualPriorities.Default.LevelPaused
            }.CenterIt();
        }
 public UpgradeTurretContextualMenuChoice(string name, Text price, Text level, Image logo)
     : base(name)
 {
     Price = price;
     Level = level;
     Logo = logo;
 }
 public CashTakenAnimation(int value, Vector3 position, double visualPriority)
     : base(1000, visualPriority)
 {
     Value = new Text(value + "$", @"Pixelite", position)
     {
         SizeX = 2,
         VisualPriority = visualPriority
     }.CenterIt();
 }
        public LogoTextContextualMenuChoice(string name, Text label, Image logo)
            : base(name)
        {
            Label = label;
            Logo = logo;

            DistanceBetweenNameAndLogo = new Vector2(Logo.AbsoluteSize.X + 10, 4);
            LogoOffet = Vector3.Zero;
        }
 public TurretMoneyAnimation(int value, bool plusSign, Vector3 position, double visualPriority)
     : base(1000, visualPriority)
 {
     MoneySpent = new Text((plusSign? "+" : "-") + value + "$", @"Pixelite", position)
     {
         SizeX = 2,
         VisualPriority = visualPriority
     }.CenterIt();
 }
Esempio n. 11
0
        public PlayerCash(Simulator simulator, CommonStash stash)
        {
            Simulator = simulator;
            Stash = stash;

            Cash = new Text(Stash.Cash.ToString(), @"Pixelite")
            {
                SizeX = 2,
                VisualPriority = VisualPriorities.Default.PlayerCash
            };
        }
Esempio n. 12
0
        public NextWavePreview(Simulator simulator, double visualPriority)
        {
            Simulator = simulator;

            Progress = new Text(@"Pixelite")
            {
                SizeX = 2,
                Color = Colors.Default.AlienBright,
                VisualPriority = visualPriority
            };
        }
Esempio n. 13
0
        public CheckBox(string label)
        {
            Label = new Text(label, @"Pixelite") { SizeX = 2 };

            Box = new Image("WidgetPush") { SizeX = 4, Origin = Vector2.Zero };
            CheckedRep = new Image("WidgetChecked") { SizeX = 4, Origin = Vector2.Zero };

            BoxCircle = new Circle(Vector3.Zero, Box.AbsoluteSize.X / 2);

            MinSpaceLabelX = 50;
        }
Esempio n. 14
0
        public ImageLabel(List<Image> images, Text text)
        {
            Images = images;

            foreach (var img in images)
                img.Origin = Vector2.Zero;
            
            Text = text;

            CanHover = false;
            Rectangle = new PhysicalRectangle();
        }
Esempio n. 15
0
        public ManualTextBubble(CommanderScene scene, Text text, Vector3 position, double visualPriority)
            : base(scene, new PhysicalRectangle(), visualPriority)
        {
            Text = text;
            Text.VisualPriority = visualPriority - 0.00001;
            Position = position;

            ComputeSize();
            ComputePosition();

            Visible = false;
        }
Esempio n. 16
0
        public Translator(Scene scene, Vector3 position, string alienFontName, Color alienColor, string knownFont, Color knownColor, string text, float size, bool showTranslation, int timeTranslation, int timeBetweenTwoTranslation, double visualPriority, bool visible)
        {
            Scene = scene;
            Position = position;
            ShowTranslation = showTranslation;
            TotalTimeTranslation = timeTranslation;
            TotalTimeElapsed = 0;
            TimeEachTranslation = timeBetweenTwoTranslation;
            CenterText = false;
            TextToTranslate = text;

            ToTranslate = new Text(text, alienFontName, alienColor, position)
            {
                SizeX = size,
                VisualPriority = visualPriority,
                Alpha = visible ? alienColor.A : (byte) 0
            };


            Translated = new Text("", knownFont, knownColor, position)
            {
                SizeX = size,
                VisualPriority = visualPriority,
                Alpha = visible ? knownColor.A : (byte) 0
            };



            PartNotTranslated = new char[text.Length];
            PartTranslated = new char[text.Length];
            TimeTranslateALetter = new double[text.Length];
            TimeTranslationElapsed = new double[text.Length];
            AlienVersion = new char[text.Length];

            for (int i = 0; i < text.Length; i++)
            {
                if (text[i] == '\n')
                {
                    PartTranslated[i] = PartNotTranslated[i] = text[i];
                    TimeTranslateALetter[i] = 0;
                    TimeTranslationElapsed[i] = 0;
                }

                else
                {
                    PartTranslated[i] = PartNotTranslated[i] = AlienVersion[i] = (char)Main.Random.Next(48, 100);
                    TimeTranslateALetter[i] = Main.Random.Next(0, timeTranslation);
                    TimeTranslationElapsed[i] = Main.Random.Next(0, timeBetweenTwoTranslation);
                }
            }

        }
Esempio n. 17
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;
        }
Esempio n. 18
0
        public CommanderAnimation(Scene scene)
        {
            Scene = scene;

            Background = new Image("PixelBlanc")
            {
                Color = Color.White,
                Alpha = 0,
                Size = Preferences.BackBuffer,
                VisualPriority = VisualPriorities.Cutscenes.IntroCommanderBackground,
                Blend = BlendType.Add
            };

            Commander = new Text("Commander", @"Pixelite")
            {
                Color = Color.White,
                SizeX = 16,
                VisualPriority = VisualPriorities.Cutscenes.IntroCommanderText
            };

            SubTitle = new Translator(
                scene,
                new Vector3(0, 100, 0),
                "Alien", Colors.Default.NeutralDark,
                @"Pixelite", Colors.Default.AlienBright,
                "Todo: Subtitle here",
                5, true, 4000, 250, VisualPriorities.Cutscenes.IntroCommanderText, false);
            SubTitle.CenterText = true;

            TimeBeforeIn = IntroCutscene.Timing["CommanderIn"];

            PrepareLetters();

            //Scene.VisualEffects.Add(Background, Core.Visual.VisualEffects.FadeInFrom0(255, TimeBeforeIn, 2000));
            //Scene.VisualEffects.Add(Background, Core.Visual.VisualEffects.FadeOutTo0(255, TimeBeforeIn + 11000, 2000));

            foreach (var kvp in Letters)
            {
                kvp.Key.Alpha = 0;

                Scene.PhysicalEffects.Add(kvp.Key, Core.Physics.PhysicalEffects.Move(kvp.Value, TimeBeforeIn + 2000, 10000));
                Scene.VisualEffects.Add(kvp.Key, Core.Visual.VisualEffects.FadeInFrom0(255, TimeBeforeIn + Main.Random.Next(2000, 3000), 1500));
                Scene.VisualEffects.Add(kvp.Key, Core.Visual.VisualEffects.FadeOutTo0(255, TimeBeforeIn + 11000, 1000));
            }

            Scene.VisualEffects.Add(SubTitle, Core.Visual.VisualEffects.FadeInFrom0(255, TimeBeforeIn + 5000, 3000));
            Scene.VisualEffects.Add(SubTitle, Core.Visual.VisualEffects.FadeOutTo0(255, TimeBeforeIn + 11000, 1000));

            Elapsed = 0;
        }
Esempio n. 19
0
        public LocationAnimation(Scene scene)
        {
            Scene = scene;

            Where = new Text("Far far away, in a tiny colony", @"Pixelite", new Vector3(-600, 260, 0))
            {
                SizeX = 3,
                Alpha = 0,
                VisualPriority = VisualPriorities.Cutscenes.IntroLocation
            };

            TimeIn = IntroCutscene.Timing["LocationIn"];

            Scene.VisualEffects.Add(Where, Core.Visual.VisualEffects.FadeInFrom0(255, TimeIn, 2000));
            Scene.VisualEffects.Add(Where, Core.Visual.VisualEffects.FadeOutTo0(255, TimeIn + 4000, 2000));
        }
Esempio n. 20
0
        public NextWaveMenu(
            Simulator simulator,
            Dictionary<EnemyType, EnemyDescriptor> ennemisQtes,
            Vector3 positionInitiale,
            float prioriteAffichage)
        {
            Simulator = simulator;
            EnnemisQtes = ennemisQtes;
            Position = positionInitiale;
            PrioriteAffichage = prioriteAffichage;

            RepresentationsEnnemis = new Dictionary<EnemyType, Image>();
            RepresentationsQtes = new Dictionary<EnemyType, Text>();
            RepresentationsNiveaux = new Dictionary<EnemyType, Text>();

            foreach (var kvp in EnemiesFactory.ImagesEnemies)
            {
                Image im = new Image(kvp.Value)
                {
                    VisualPriority = this.PrioriteAffichage + 0.00001f,
                    SizeX = 4
                };

                RepresentationsEnnemis.Add(kvp.Key, im);

                Text t = new Text(@"Pixelite")
                {
                    VisualPriority = this.PrioriteAffichage,
                    SizeX = 2
                };

                RepresentationsQtes.Add(kvp.Key, t);

                t = new Text(@"Pixelite")
                {
                    VisualPriority = this.PrioriteAffichage,
                    SizeX = 1
                };

                RepresentationsNiveaux.Add(kvp.Key, t);
            }

            Bubble = new Bubble(Simulator.Scene, new PhysicalRectangle(), this.PrioriteAffichage + 0.0001f);
            Bubble.BlaPosition = 1;

            Visible = false;
        }
Esempio n. 21
0
        public LoadingScene()
            : base("Chargement")
        {
            EnableVisuals = true;
            EnableInputs = true;
            EnableUpdate = true;

            SandGlass = new SandGlass(this, 5000, new Vector3(0, 250, 0), 0.3f)
            {
                Color = Colors.Default.NeutralDark,
                RemainingTime = 5000,
                Alpha = 0
            };


            Logo = new EphemereGamesLogo(this, Vector3.Zero, 0.3)
            {
                Alpha = 0
            };

            Persistence.LoadPackage("principal");

            SceneState = State.LoadingAssets;

            Background = new Image("WhiteBg", Vector3.Zero)
            {
                VisualPriority = 1,
                Color = new Color(Main.Random.Next(235, 255), Main.Random.Next(235, 255), Main.Random.Next(235, 255)),
                Alpha = 0
            };

            LoadingQuote = new Text(LoadingQuotes[Main.Random.Next(0, LoadingQuotes.Count)], @"Pixelite", new Vector3(0, 150, 0))
            {
                Color = Color.Transparent,
                SizeX = 3
            }.CenterIt();

            VisualEffects.Add(Background, Core.Visual.VisualEffects.FadeInFrom0(255, 0, 500));
            VisualEffects.Add(Logo, Core.Visual.VisualEffects.FadeInFrom0(255, 0, 1000));
            VisualEffects.Add(Logo, Core.Visual.VisualEffects.FadeOutTo0(255, TimeBeforeTranslation - 500, 500));
            VisualEffects.Add(LoadingQuote, Core.Visual.VisualEffects.FadeInFrom0(255, TimeBeforeTranslation, 1000));
            SandGlass.FadeIn(TimeBeforeTranslation, 1000);
            
            ScenesAreLoaded = false;

            //Main.MusicController.PlayOrResume("EphemereGamesLogo");
        }
Esempio n. 22
0
        public GameMenu(Simulator simulator, Vector3 position)
        {
            Simulator = simulator;
            Position = position;

            Cash = 0;

            CashImage = new Image("ScoreMoney")
            {
                SizeX = 4,
                Alpha = 0,
                VisualPriority = Preferences.PrioriteGUIPanneauGeneral + 0.05,
                Position = Position,
                Origin = Vector2.Zero
            };

            CashText = new Text(@"Pixelite")
            {
                Alpha = 0,
                VisualPriority = Preferences.PrioriteGUIPanneauGeneral + 0.05,
                SizeX = 3,
                Position = CashImage.Position + new Vector3(CashImage.AbsoluteSize.X + 5, 0, 0)
            };


            LivesImage = new Image("ScoreLives")
            {
                SizeX = 4,
                Alpha = 0,
                VisualPriority = Preferences.PrioriteGUIPanneauGeneral + 0.05,
                Position = Position + new Vector3(0, CashImage.AbsoluteSize.Y, 0),
                Origin = Vector2.Zero
            };


            LivesText = new Text(@"Pixelite")
            {
                Alpha = 0,
                VisualPriority = Preferences.PrioriteGUIPanneauGeneral + 0.05,
                SizeX = 3,
                Position = LivesImage.Position + new Vector3(LivesImage.AbsoluteSize.X + 5, 0, 0)
            };


            Faded = true;
            FadeIn(255, 3000);
        }
        public WorldAnnunciationScene(WorldDescriptor descriptor) :
            base(Main.LevelsFactory.GetWorldAnnounciationStringId(descriptor.Id))
        {
            Descriptor = descriptor;

            WorldId = new Text(Main.LevelsFactory.GetWorldStringId(Descriptor.Id), @"Pixelite")
            {
                SizeX = 4,
                Color = Color.Black
            }.CenterIt();

            Background = new Image("WhiteBg", Vector3.Zero)
            {
                VisualPriority = 1,
                Alpha = 0
            };
        }
Esempio n. 24
0
        public PlayerLivesLiteral(Simulator simulator)
        {
            Simulator = simulator;

            LifeImage = new Image("ViesEnnemis5")
            {
                SizeX = 2,
                VisualPriority = VisualPriorities.Default.PlayerLives,
                Origin = Vector2.Zero
            };

            LifesCount = new Text(@"Pixelite")
            {
                SizeX = 2,
                VisualPriority = VisualPriorities.Default.PlayerLives
            };
        }
        public EndOfWorld1Animation(WorldScene worldScene)
            : base(worldScene, /*30000*/ int.MaxValue /*tmp*/)
        {
            Path = Simulator.PlanetarySystemController.Path;

            // Prepare celestial bodies to destroy
            CelestialBodiesToDestroy = new List<CelestialBody>();

            foreach (var cb in Path.CelestialBodies)
                if (cb != Path.FirstCelestialBody && cb != Path.LastCelestialBody)
                    CelestialBodiesToDestroy.Add(cb);

            MothershipAnimation = new MothershipAnimation(Simulator)
            {
                ArrivalZoom = 0.7f,
                DepartureZoom = 1f,
                CelestialBodies = CelestialBodiesToDestroy,
                TimeBeforeArrival = 0,
                TimeArrival = 5500,
                TimeBeforeLights = 5500,
                TimeLights = 2000,
                TimeBeforeDestruction = 7500,
                TimeBeforeDeparture = 17500,
                TimeDeparture = 5000
            };

            // Switch the music

            // Stop spawning enemies
            // Verify with Xbox 360 controller (vibration on edges)

            // To check:


            worldScene.NeedReinit = true;
            Simulator.SpawnEnemies = false;
            //Path.RemoveCelestialBody(Path.FirstCelestialBody);

            TmpEndOfAlpha = new Text("End of demo!", "Pixelite")
            {
                SizeX = 4,
                Alpha = 0,
                VisualPriority = VisualPriorities.Default.Path + 0.01
            }.CenterIt();
            Simulator.Scene.VisualEffects.Add(TmpEndOfAlpha, VisualEffects.FadeInFrom0(255, 20000, 2000));
        }
        public NumericHorizontalSlider(string label, int min, int max, int startingValue, int increment, int minimalSpaceForValue)
        {
            Value = startingValue;
            Min = min;
            Max = max;
            Increment = increment;

            DecrementRep = new Image("WidgetNext") { Origin = Vector2.Zero, Effect = SpriteEffects.FlipHorizontally, SizeX = 4 };
            IncrementRep = new Image("WidgetNext") { Origin = Vector2.Zero, SizeX = 4 };

            ValueText = new Text(Value.ToString(), @"Pixelite") { SizeX = 2 }.CenterIt();
            Label = new Text(label, @"Pixelite") { SizeX = 2 };

            DecrementCircle = new Circle(Vector3.Zero, DecrementRep.AbsoluteSize.X / 2);
            IncrementCircle = new Circle(Vector3.Zero, IncrementRep.AbsoluteSize.X / 2);

            MinimalSpaceForValue = minimalSpaceForValue;
        }
Esempio n. 27
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;
        }
Esempio n. 28
0
        public NextWaveWidget()
        {
            EnemiesImages = new Dictionary<EnemyType, Image>();

            foreach (var kvp in EnemiesFactory.ImagesEnemies)
            {
                Image im = new Image(kvp.Value)
                {
                    Origin = Vector2.Zero,
                    SizeX = 4
                };

                EnemiesImages.Add(kvp.Key, im);
            }

            Enemies = new List<Image>();
            Quantity = new Text(@"Pixelite") { SizeX = 3 };

            DistanceEnemiesX = 10;
            DistanceQuantityX = 10;

            Rectangle = new PhysicalRectangle();
        }
Esempio n. 29
0
        public MainMenuChoices(Simulator simulator, double visualPriority)
        {
            Simulator = simulator;

            Texts = new Dictionary<Text, CelestialBody>();

            foreach (var c in Simulator.PlanetarySystemController.CelestialBodies)
            {
                if (c is AsteroidBelt)
                    continue;

                var text = new Text(c.Name, @"Pixelite")
                {
                    SizeX = 3,
                    VisualPriority = visualPriority,
                    Alpha = 0
                }.CenterIt();

                Texts.Add(text, c);
            }

            VisualEffectsIds = new List<int>();
        }
Esempio n. 30
0
        public PowerUpsMenu(Simulator simulator, Vector3 position, double visualPriority)
        {
            Simulator = simulator;
            VisualPriority = visualPriority;
            Position = position;
            TextSize = 2;
            ImageSize = 2;
            DistanceBetweenTwoChoices = new Vector3(30, 30, 0);
            PowerUpsLayout = new Vector3(4, 4, 0);

            PowerUpPriceTitleAndCost = new Text(@"Pixelite")
            {
                SizeX = TextSize,
                VisualPriority = VisualPriority + 0.001f
            };

            PowerUpDescription = new Text(@"Pixelite")
            {
                SizeX = TextSize - 1,
                VisualPriority = VisualPriority + 0.001f
            };

            PowerUpPriceBubble = new Bubble(Simulator.Scene, new PhysicalRectangle(0, 0, 100, 30), VisualPriority + 0.002)
            {
                BlaPosition = 3
            };

            ColorPowerUpAvailable = Color.White;
            ColorPowerUpNotAvailable = Color.Red;

            ImagesPowerUpsBuy = new Dictionary<PowerUpType, Image>(PowerUpTypeComparer.Default);
            ImagesPlaceHolders = new Dictionary<PowerUpType, Image>(PowerUpTypeComparer.Default);
            ImagesTurretsPowerUps = new Dictionary<PowerUpType, Turret>(PowerUpTypeComparer.Default);

            HumanBattleship = new PowerUpsBattleship(Simulator, VisualPriority + 0.005f);
        }