Exemplo n.º 1
0
 public DesertBackground(Scene scene)
     : base(scene)
 {
     AddLayer("BackgroundSky");
     AddLayer("BackgroundMountains");
     GroundLayer = AddLayer("BackgroundFront");
     //AddLayer("BackgroundFront").SetPosition(scene.Width / -2, 50);
     AddLayer("BackgroundClouds", 101);
     ScaleToScreen();
     ScrollControlLayer = 3;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Load the play screen
        /// </summary>
        public override void Load()
        {
            BackgroundColor = Color.SkyBlue;
            DesertBackground desertBackground = new DesertBackground(this);
            GroundLayer = desertBackground.GroundLayer;
            Background = desertBackground;
            AddSong("Chopliftertheme");
            FontName = "DirtyEgo";

            // Add the saved text
            SavedText = AddText(new Text
            {
                Alignment = HorizontalAlignments.Left,
                VerticalAlign = VerticalAlignments.Top,
                Scale = 1f,
                Position = new Vector2(-160f, 100f),
                Color = Color.White
            });

            // Add the score text
            ScoreText = AddText(new Text
            {
                Alignment = HorizontalAlignments.Center,
                VerticalAlign = VerticalAlignments.Bottom,
                Scale = 0.8f,
                Position = new Vector2(140, -100),
                Color = Color.White
            });

            // Add the level text
            LevelText = AddText(new Text
            {
                Alignment = HorizontalAlignments.Left,
                VerticalAlign = VerticalAlignments.Bottom,
                Scale = 0.8f,
                Position = new Vector2(-160f, -100f),
                Color = Color.White
            });

            // Add the in text
            InText = AddText(new Text
            {
                Alignment = HorizontalAlignments.Center,
                VerticalAlign = VerticalAlignments.Top,
                Scale = 1f,
                Position = new Vector2(0f, 100f),
                Color = Color.White
            });

            // Add the dead text
            DeadText = AddText(new Text
            {
                Alignment = HorizontalAlignments.Right,
                VerticalAlign = VerticalAlignments.Top,
                Scale = 1f,
                Position = new Vector2(160f, 100f),
                Color = Color.White
            });

            // Add the lives text
            LivesText = AddText(new Text
            {
                Alignment = HorizontalAlignments.Center,
                VerticalAlign = VerticalAlignments.Bottom,
                Scale = 0.8f,
                Position = new Vector2(0f, -100f),
                Color = Color.White
            });

            // Load Costumes
            Explosion explosion = new Explosion();
            explosion.Load();
        }