Exemple #1
0
        public override void LoadContent()
        {
            base.LoadContent();
            Background = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/bluescreen");
            Text       = TheLastSliceGame.Instance.Content.Load <SpriteFont>("Fonts/Joystix_24");
            YouWin     = TheLastSliceGame.Instance.Content.Load <SpriteFont>("Fonts/Joystix_24");
            Name       = TheLastSliceGame.Instance.Content.Load <SpriteFont>("Fonts/Joystix_40");

            ArrowLeftAnim  = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-left"), 6);
            ArrowRightAnim = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-right"), 6);
            MenuTexture    = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/submit");

            ArrowLeft  = new UIEntity(Vector2.Zero, ArrowLeftAnim);
            ArrowRight = new UIEntity(Vector2.Zero, ArrowRightAnim);
            Menu       = new UIEntity(Vector2.Zero, MenuTexture);

            //line everything up
            MenuX       = TheLastSliceGame.Instance.GameWidth / 2 - Menu.HalfWidth;
            MenuY       = 475;
            MenuWidth   = Menu.Width;
            MenuXCenter = TheLastSliceGame.Instance.GameWidth / 2;

            ArrowLeftX  = MenuXCenter - MenuWidth / 2 - ArrowPadding;
            ArrowRightX = MenuXCenter + (MenuWidth / 2) + ArrowPadding - ArrowRight.Width;

            ArrowY = (MenuY + Menu.HalfHeight) - ArrowLeft.HalfHeight;

            ArrowLeft.Position  = new Vector2(ArrowLeftX, ArrowY);
            ArrowRight.Position = new Vector2(ArrowRightX, ArrowY);
            Menu.Position       = new Vector2(MenuX, MenuY);
        }
Exemple #2
0
        public override void LoadContent()
        {
            base.LoadContent();
            Background  = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/MainMenuBackground");
            MenuTexture = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/main-menu");
            Text        = TheLastSliceGame.Instance.Content.Load <SpriteFont>("Fonts/Joystix_12");

            ArrowLeftAnim  = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-left"), 6);
            ArrowRightAnim = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-right"), 6);
            ArrowLeft      = new UIEntity(Vector2.Zero, ArrowLeftAnim);
            ArrowRight     = new UIEntity(Vector2.Zero, ArrowRightAnim);
            Menu           = new UIEntity(Vector2.Zero, MenuTexture);

            ArrowPadding  = 50;
            ArrrowYOffset = 45;

            //line everything up
            MenuX = TheLastSliceGame.Instance.GameWidth / 2 - MenuTexture.Width / 2;
            MenuY = 375;

            Menu0Width  = 182;
            Menu1Width  = 400;
            Menu2Width  = 146;
            MenuXCenter = TheLastSliceGame.Instance.GameWidth / 2;

            ArrowLeftX0  = MenuXCenter - Menu0Width / 2 - ArrowPadding;
            ArrowLeftX1  = MenuXCenter - Menu1Width / 2 - ArrowPadding;
            ArrowLeftX2  = MenuXCenter - Menu2Width / 2 - ArrowPadding;
            ArrowRightX0 = MenuXCenter + (Menu0Width / 2) + ArrowPadding - ArrowRight.Width - 10;
            ArrowRightX1 = MenuXCenter + (Menu1Width / 2) + ArrowPadding - ArrowRight.Width - 10;
            ArrowRightX2 = MenuXCenter + (Menu2Width / 2) + ArrowPadding - ArrowRight.Width - 10;

            ArrowY1 = MenuY + (MenuTexture.Height / 2) - ArrowLeft.HalfHeight;

            ArrowY0 = ArrowY1 - ArrrowYOffset;
            ArrowY2 = ArrowY1 + ArrrowYOffset;

            MenuIndex           = 0;
            ArrowLeft.Position  = new Vector2(ArrowLeftX0, ArrowY0);
            ArrowRight.Position = new Vector2(ArrowRightX0, ArrowY0);
            Menu.Position       = new Vector2(MenuX, MenuY);

            StartGame       = TheLastSliceGame.Instance.Content.Load <SoundEffect>("Sounds/thelastslice");
            TransitionTimer = TimeSpan.Zero;
            Leaderboard     = TheLastSliceGame.Instance.Content.Load <SoundEffect>("Sounds/leaderboard");
        }
        public override void LoadContent()
        {
            base.LoadContent();
            Leaderboard = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/leaderboard");
            Exit        = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/exit");
            Background  = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/LevelTransitionScreen");
            Text        = TheLastSliceGame.Instance.Content.Load <SpriteFont>("Fonts/Joystix_19");

            ArrowLeftAnim  = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-left"), 6);
            ArrowRightAnim = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-right"), 6);
            ArrowLeft      = new UIEntity(Vector2.Zero, ArrowLeftAnim);
            ArrowRight     = new UIEntity(Vector2.Zero, ArrowRightAnim);
            MenuIndex      = 0;

            ArrowLeft.Position  = new Vector2(TheLastSliceGame.Instance.GameWidth / 2 - Exit.Width / 2 - ArrowLeft.Width, 525);
            ArrowRight.Position = new Vector2(TheLastSliceGame.Instance.GameWidth / 2 + Exit.Width / 2 - 10, 525);

            SnakeInTheBox = new Entity(new Vector2(10, 495));
            SnakeInTheBox.AddAnimations("BXRIGHT", new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("Entity/Level1/Vehicles/BOX_RIGHT"), 20, 0.01f));
        }
Exemple #4
0
        public override void LoadContent()
        {
            //Finish HIM!
            base.LoadContent();
            Background     = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/GameOverScreen");
            GameOver       = TheLastSliceGame.Instance.Content.Load <SpriteFont>("Fonts/Joystix_40");
            MenuTexture    = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/game-over");
            Bubble         = TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/Bubble");
            ArrowLeftAnim  = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-left"), 6);
            ArrowRightAnim = new Animation(TheLastSliceGame.Instance.Content.Load <Texture2D>("UI/arrow-right"), 6);

            GameOverText    = "Game Over";
            NoTipForYouText = "No Tip For You.";

            ArrowPadding        = 50;
            ArrrowYOffset       = 45;
            BubbleYCenterOffset = 20;
            BubbleLineOffset    = 10;
            BubbleOffsetX       = 90;
            BubbleOffsetY       = 30;
            GameOverY           = 230;
            NoTipForYouY        = 290;

            ArrowLeft  = new UIEntity(Vector2.Zero, ArrowLeftAnim);
            ArrowRight = new UIEntity(Vector2.Zero, ArrowRightAnim);
            Menu       = new UIEntity(Vector2.Zero, MenuTexture);

            //line everything up
            MenuX       = TheLastSliceGame.Instance.GameWidth / 2 - MenuTexture.Width / 2;
            MenuY       = 475;
            Menu0Width  = 300;
            Menu1Width  = 134;
            MenuXCenter = TheLastSliceGame.Instance.GameWidth / 2;

            GameOverTextSize    = GameOver.MeasureString(GameOverText);
            NoTipForYouTextSize = Text.MeasureString(NoTipForYouText);

            GameOverX    = (int)(MenuXCenter - GameOverTextSize.X / 2);
            NoTipForYouX = (int)(MenuXCenter - NoTipForYouTextSize.X / 2);

            BubbleX       = GameOverX - BubbleOffsetX;
            BubbleY       = GameOverY - Bubble.Height + BubbleOffsetY;
            BubbleXCenter = BubbleX + (Bubble.Width / 2);
            BubbleYCenter = BubbleY - BubbleYCenterOffset + (Bubble.Height / 2);

            Frog = new Ingredient(new Vector2(700, 375), "UIFRL");
            Frog.LoadTexture();

            ArrowLeftX0  = MenuXCenter - Menu0Width / 2 - ArrowPadding;
            ArrowLeftX1  = MenuXCenter - Menu1Width / 2 - ArrowPadding;
            ArrowRightX0 = MenuXCenter + (Menu0Width / 2) + ArrowPadding - ArrowRight.Width;
            ArrowRightX1 = MenuXCenter + (Menu1Width / 2) + ArrowPadding - ArrowRight.Width;

            ArrowY0 = MenuY + 16 - ArrowLeft.HalfHeight;
            ArrowY1 = ArrowY0 + ArrrowYOffset;

            MenuIndex           = 0;
            ArrowLeft.Position  = new Vector2(ArrowLeftX0, ArrowY0);
            ArrowRight.Position = new Vector2(ArrowRightX0, ArrowY0);
            Menu.Position       = new Vector2(MenuX, MenuY);

            Score = 0;
        }