Пример #1
0
        public void Draw(Scene scene)
        {
            Tentacules.Position = Image.Position;

            scene.Add(Image);
            scene.Add(Tentacules);
        }
Пример #2
0
        public HelpPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle("How to play");

            Alpha = 0;
        }
Пример #3
0
        public ControlsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle("Controls");

            Alpha = 0;
        }
Пример #4
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));
        }
Пример #5
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;
        }
Пример #6
0
        public Path(Simulator simulator, ColorInterpolator color, byte alpha, BlendType blend)
        {
            Scene = simulator.Scene;
            ColorInterpolator = color;
            
            InnerPath = new Path3D();
            Times = new List<double>(MaxCurvePoints);
            Points = new List<Vector3>(MaxCurvePoints);

            for(int i = 0; i < MaxCurvePoints; i++)
            {
                Times.Add(0);
                Points.Add(Vector3.Zero);
            }

            NbPoints = 0;
            Length = 0;
            LengthBefore = 0;

            Lines = new Image[MaxVisibleLines];

            for (int i = 0; i < MaxVisibleLines; i++)
            {
                Lines[i] = new Image("LigneTrajet", Vector3.Zero)
                {
                    Blend = blend,
                    SizeX = 1.5f,
                    Alpha = alpha
                };
            }

            Active = true;
            TakeIntoAccountFakeGravTurret = false;
            TakeIntoAccountFakeGravTurretLv2 = false;
        }
Пример #7
0
        public Scene UpdateScene(string sceneName, Scene scene)
        {
            Scene actualScene = Scenes[sceneName];

            if (actualScene != null)
                actualScene.CleanUp();

            Scenes[sceneName] = scene;

            return scene;
        }
Пример #8
0
        public Panel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
        {
            Position = position - new Vector3(size / 2f, 0);
            VisualPriority = visualPriority;

            RecomputePositions = true;

            Background = new Image("PixelBlanc", position)
            {
                Size = size,
                Color = Color.Black,
                VisualPriority = visualPriority + 0.03,
                Origin = Vector2.Zero
            };
            BackgroundAlpha = 200;

            Corners = new List<Image>();
            Edges = new List<Image>();

            for (int i = 0; i < 4; i++)
            {
                Corners.Add(new Image("bulleCoin") { VisualPriority = visualPriority + 0.0002, Color = color });
                Edges.Add(new Image("PixelBlanc") { VisualPriority = visualPriority + 0.0002, Origin = Vector2.Zero, Color = color });
            }

            Dimension = new Vector3(size, 0);

            TitleSeparator = new Image("PixelBlanc")
            {
                Color = color,
                VisualPriority = visualPriority + 0.0002,
                Origin = Vector2.Zero,
                Size = new Vector2(size.X, 5)
            };

            CloseButton = new CloseButton(scene, new Vector3(Position.X + Dimension.X - 20, Position.Y + 15, 0), visualPriority)
            {
                Sticky = true
            };

            Visible = true;

            Widgets = new List<KeyValuePair<string, PanelWidget>>();
            TitleBarWidgets = new List<PanelWidget>();

            ShowFrame = true;
            ShowBackground = true;
            ShowCloseButton = true;

            Padding = Vector2.Zero;
            Alpha = 255;

            Scene = scene; //after created CloseButton
        }
Пример #9
0
 public PinkHoleLite(
     Scene scene,
     Vector3 position,
     Particle effect,
     double visualPriority)
 {
     Effect = effect;
     Scene = scene;
     Position = position;
     VisualPriority = visualPriority;
 }
Пример #10
0
        public CloseButton(Scene scene, Vector3 position, double visualPriority)
        {
            Button = new Image("WidgetClose")
            {
                SizeX = 4
            };

            VisualPriority = visualPriority;
            Position = position;

            ButtonCircle = new Circle(position, Button.AbsoluteSize.X / 2);
        }
Пример #11
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);
                }
            }

        }
Пример #12
0
        public SlideshowPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            Slider = new NumericHorizontalSlider("", 0, 0, 0, 1, 200)
            {
                Scene = scene
            };

            Slider.Initialize();
            Slider.VisualPriority = visualPriority;

            Panels = new List<PanelWidget>();
        }
Пример #13
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;
        }
Пример #14
0
        public EphemereGamesLogo(Scene scene, Vector3 position, double visualPriority)
        {
            Scene = scene;

            MaxBackAlpha = 170;
            MaxFrontAlpha = 190;

            EphemereBack = new Image("LogoBack", position) { Alpha = 0 };
            EphemereFront = new Image("LogoFront", position);
            Games = new Image("LogoGames", position + new Vector3(0, 75, 0));

            TimeBeforeFadeColour = 1000;
            FadeColourDone = false;
        }
Пример #15
0
        public LevelStates(Scene scene)
        {
            Scene = scene;
            LevelUnlockedStates = new Dictionary<int, bool>();
            LockedTexts = new Dictionary<int, Text>();
            LevelsNumbers = new Dictionary<int, Text>();

            LockedMaxAlpha = 100;
            GamePausedMaxAlpha = 200;
            alpha = 255;
            NumbersMaxAlpha = 200;

            AllLevelsUnlockedOverride = false;
        }
Пример #16
0
        public ParticlesController(Scene scene)
        {
            ParticlesPools = new Dictionary<string, Utilities.Pool<Particle>>();
            Particles = new List<Particle>();


            Renderer = new ProjectMercury.Renderers.SpriteBatchRenderer
            {
                GraphicsDeviceService = Preferences.GraphicsDeviceManager
            };

            Renderer.LoadContent(Preferences.Content);

            this.Scene = scene;
        }
Пример #17
0
        public Cursor(Scene scene, Vector3 initialPosition, float speed, double visualPriority, string imageName, bool visible)
        {
            Scene = scene;
            Speed = speed;
            VisualPriority = visualPriority;
            SetFrontImage(imageName, 1, new Color(255, 255, 255, 0));
            Shape = Shape.Circle;
            Circle = new Circle(initialPosition, Size.X / 4);
            Position = initialPosition;
            BackImage = null;
            MaxAlpha = 255;

            if (visible)
                FadeIn();
        }
Пример #18
0
        public LevelsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SelectedLevelLabel = new Label(new Text("Selected level: none", @"Pixelite") { SizeX = 2 });
            PushButtons = new Dictionary<LevelDescriptor, PushButton>();

            Levels = new GridPanel(scene, position, size, visualPriority, color)
            {
                NbColumns = 10
            };
            Levels.OnlyShowWidgets = true;

            AddWidget("SelectedLevel", SelectedLevelLabel);
            AddWidget("Levels", Levels);
        }
Пример #19
0
        public SpaceshipCursor(Scene scene, Vector3 initialPosition, float speed, double visualPriority, Color color, string image, bool visible)
            : base(scene, initialPosition, speed, visualPriority, image, false)
        {
            FrontImage.SizeX = 4;

            SetBackImage(image + "Back", 4, color);
            Circle.Radius = FrontImage.Size.X / 2;

            FiringCursor = new Image("FiringDirection")
            { 
                SizeX = 4,
                Alpha = 150,
                VisualPriority = visualPriority + 0.00001
            };


            FiringCursor.Origin = new Vector2(FiringCursor.Center.X, FrontImage.Center.Y + 7);

            Color = color;

            ShowTrail = true;

            TrailEffect = Scene.Particles.Get(@"spaceshipTrail");
            TrailEffect.Model[0].ReleaseColour = Color.ToVector3();
            TrailEffect.VisualPriority = BackImage.VisualPriority + 0.00001;

            TrailEffect2 = Scene.Particles.Get(@"spaceshipTrail2");
            TrailEffect2.VisualPriority = BackImage.VisualPriority + 0.00002;

            LastPosition = Position;

            NotMovingReleaseSpeed = new ProjectMercury.VariableFloat()
            {
                Value = 50,
                Variation = 0
            };

            MovingReleaseSpeed = new ProjectMercury.VariableFloat()
            {
                Value = 0,
                Variation = 25
            };

            TrailEffect.Model[0].ReleaseSpeed = NotMovingReleaseSpeed;
            TrailEffect2.Model[0].ReleaseSpeed = NotMovingReleaseSpeed;

            ShowFiringCursor = false;
        }
Пример #20
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));
        }
Пример #21
0
        public DisableBar(Scene scene)
        {
            Scene = scene;

            ProgressBarImage = new Image("PixelBlanc", Vector3.Zero)
            {
                Size = new Vector2(36, 4),
                Color = new Color(255, 0, 220, 255),
                Origin = new Vector2()
            };

            BarImage = new Image("BarreInactivite", Vector3.Zero)
            {
                SizeX = 3f
            };
        }
Пример #22
0
        public OptionsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle("Options");

            Music = new NumericHorizontalSlider("Music", 0, 10, 5, 1, 100);
            Sfx = new NumericHorizontalSlider("Sfx  ", 0, 10, 5, 1, 100);
            Fullscreen = new CheckBox("Fullscreen") { MinSpaceLabelX = 292 };
            ShowHelpBar = new CheckBox("Show help bar") { MinSpaceLabelX = 292 };

            AddWidget("Music", Music);
            AddWidget("Sfx", Sfx);
            AddWidget("Fullscreen", Fullscreen);
            AddWidget("ShowHelpBar", ShowHelpBar);

            Alpha = 0;
        }
        public MineralTakenAnimation(Scene scene, MineralDefinition definition, Vector3 position, double visualPriority)
            : base(1000, visualPriority)
        {
            Value = new Image(definition.Texture, position);

            switch (definition.Type)
            {
                case MineralType.Cash150:
                    Value.SizeX = 2;
                    break;
                case MineralType.Life1:
                    Value.SizeX = 2;
                    break;
            }

            scene.VisualEffects.Add(Value, Core.Visual.VisualEffects.FadeOutTo0(255, 0, 1000));
            scene.PhysicalEffects.Add(Value, Core.Physics.PhysicalEffects.Move(position + new Vector3(0, -100, 0), 0, 1000));
        }
Пример #24
0
        public SandGlass(Scene scene, double minimumTime, Vector3 position, double visualPriority)
        {
            this.Scene = scene;
            this.MinimumTime = minimumTime;
            this.Position = position;

            Pixels = new List<Image>(NB_PIXELS);

            Image = new Image("sablier", position)
            {
                SizeX = 4,
                VisualPriority = visualPriority
            };

            for (int i = 0; i < NB_PIXELS; i++)
            {
                Image iv = new Image("PixelBlanc")
                {
                    Color = Colors.Default.Pink,
                    SizeX = SIZE_PIXEL,
                    Position = this.Position + (RelativePositions[i] - new Vector3(Image.Origin.X, Image.Origin.Y, 0)) * SIZE_PIXEL,
                    VisualPriority = Image.VisualPriority - 0.01f
                };

                Vector3 origin = (this.Position - iv.Position);

                iv.Origin = new Vector2(origin.X, origin.Y) / SIZE_PIXEL;
                iv.Position += origin;

                Pixels.Add(iv);
            }

            Progress = 0;

            Shape = Shape.Rectangle;
            Vector2 representationSize = Image.AbsoluteSize;
            Rectangle = new PhysicalRectangle(
                (int) (Image.Position.X - representationSize.X / 2),
                (int) (Image.Position.Y - representationSize.Y / 2),
                (int) representationSize.X,
                (int) representationSize.Y);
        }
Пример #25
0
        public TeleportAnimation(Scene scene, List<Image> components, double visualPriority, Color color, bool fadeIn)
            : base(1500, visualPriority)
        {
            Scene = scene;
            Components = components;
            Color = color;
            FadeIn = fadeIn;

            FinalSize = FadeIn ? Components[0].SizeX : 0;
            OriginalSize = Components[0].SizeX;

            if (FadeIn)
            {
                foreach (var c in components)
                    c.SizeX = 0;
            }

            ShakeHorizontal = new Path3D(
                new List<Vector3>()
                {
                    Vector3.Zero,
                    new Vector3(10, 0, 0),
                    new Vector3(-10, 0, 0),
                    new Vector3(25, 0, 0),
                    new Vector3(-25, 0, 0),
                    new Vector3(10, 0, 0),
                    new Vector3(-10, 0, 0),
                    Vector3.Zero
                },
                
                new List<double>()
                {
                    0,
                    250,
                    500,
                    750,
                    1000,
                    1100,
                    1200,
                    1500
                });
        }
Пример #26
0
        public PausePanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle("Game Paused");

            Resume = new PushButton(new Text("Resume", @"Pixelite") { SizeX = 2 });
            Restart = new PushButton(new Text("Restart", @"Pixelite") { SizeX = 2 });
            GoBackToWorld = new PushButton(new Text("Go to galaxy", @"Pixelite") { SizeX = 2 });
            Options = new PushButton(new Text("Options", @"Pixelite") { SizeX = 2 });
            Help = new PushButton(new Text("How to play", @"Pixelite") { SizeX = 2 });
            Controls = new PushButton(new Text("Controls", @"Pixelite") { SizeX = 2 });

            AddWidget("Resume", Resume);
            AddWidget("Options", Options);
            AddWidget("Help", Help);
            AddWidget("Controls", Controls);
            AddWidget("Restart", Restart);
            AddWidget("GoBackToWorld", GoBackToWorld);

            Alpha = 0;
        }
Пример #27
0
        public CreditsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SetTitle("Credits");
            DistanceBetweenTwoChoices = 15;
            CenterWidgets = true;

            Alpha = 0;

            Separator1 = new VerticalSeparatorWidget() { MaxAlpha = 0 };

            Jodi = new Label(new Text("A game by Jodi Giordano", @"Pixelite") { SizeX = 4, Alpha = 0 }.CenterIt());
            Website = new Label(new Text("ephemeregames.com", @"Pixelite") { SizeX = 3, Alpha = 0 }.CenterIt());

            Separator2 = new VerticalSeparatorWidget() { MaxAlpha = 0 };

            SoundDesign = new Label(new Text("Sound design by FX Dupas (fxdupas.com)", "Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());

            Separator3 = new VerticalSeparatorWidget() { MaxAlpha = 0 };

            SpecialThanks = new Label(new Text("Special thanks to:", @"Pixelite") { SizeX = 3, Alpha = 0 }.CenterIt());
            Tag = new Label(new Text("TAG (tag.hexagram.ca)", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());
            Mercury = new Label(new Text("Mercury Particle Engine (mpe.codeplex.com)", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());
            EasyStorage = new Label(new Text("EasyStorage (easystorage.codeplex.com)", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());
            Backgrounds = new Label(new Text("NASA/STScI for some of the backgrounds", @"Pixelite") { SizeX = 2, Alpha = 0 }.CenterIt());

            AddWidget("Seperator", Separator1);
            AddWidget("Jodi", Jodi);
            AddWidget("Website", Website);
            AddWidget("Seperator2", Separator2);
            AddWidget("Sound", SoundDesign);
            AddWidget("Separator3", Separator3);
            AddWidget("ST", SpecialThanks);
            AddWidget("Tag", Tag);
            AddWidget("Backgrounds", Backgrounds);
            AddWidget("Mercury", Mercury);
            AddWidget("EasyStorage", EasyStorage);
        }
Пример #28
0
        public HelpBarPanel(Scene scene, double visualPriority)
            : base(scene, new Vector3(0, scene.Height / 2 - 30, 0), new Vector2(scene.Width, 35), visualPriority, Color.White)
        {
            Scene = scene;

            ShowCloseButton = false;
            ShowFrame = false;
            Padding = new Vector2(10, 0);
            BackgroundAlpha = 100;

            if (Preferences.Target == Core.Utilities.Setting.Xbox360)
            {
                Position -= new Vector3(0, Preferences.DeadZoneV2.Y, 0);
                Padding = new Vector2(10 + Preferences.DeadZoneV2.X, 0);
            }

            Current = new KeyValuePair<HelpBarMessage, List<KeyValuePair<string, PanelWidget>>>(HelpBarMessage.None, null);

            ActivePlayers = true;
            ActiveOptions = true;
            ShowOnForegroundLayer = false;

            InitializePredefinedMessages();
        }
Пример #29
0
        public HorizontalSlider(Scene scene, Vector3 position, int min, int max, int valeur, int increment, float priorite)
        {
            Scene = scene;
            Position = position;

            Valeur = valeur;
            Min = min;
            Max = max;
            Increment = increment;

            Gauche = new Image("Gauche", Position - new Vector3(50, 0, 0));
            Gauche.VisualPriority = priorite;

            Droite = new Image("Droite", Position + new Vector3(50, 0, 0));
            Droite.VisualPriority = priorite;

            ValeurRep = new Text(Valeur.ToString(), @"Pixelite", Color.White, Position);
            ValeurRep.SizeX = 2;
            ValeurRep.VisualPriority = priorite;
            ValeurRep.Origin = ValeurRep.Center;

            GaucheCercle = new Circle(Gauche.Position, 16);
            DroiteCercle = new Circle(Droite.Position, 16);
        }
Пример #30
0
        public ScoreStars(Scene scene, int brightCount, double visualPriority)
        {
            Scene = scene;
            DistanceX = 15;
            AlphaBright = 255;
            AlphaNotBright = 100;

            Images = new List<Image>();
            Positions = new List<Vector3>();

            for (int i = 0; i < 3; i++)
            {
                Images.Add(new Image("Star")
                {
                    SizeX = 0.25f,
                    VisualPriority = visualPriority,
                    Origin = Vector2.Zero
                });

                Positions.Add(Vector3.Zero);
            }

            BrightCount = brightCount;
        }