Example #1
0
        public override void Init()
        {
            base.Init();

            MediaPlayer.Volume = 0f;

            Manager.FadeInSong(Assets.MenuSong, true, 0.5f);

            tweenerY = new Tweener(0, 20, 1.5f, Linear.EaseIn);
            tweenerY.Ended += delegate() { tweenerY.Reverse(); };

            Player = new Player(Context, SkeletonPlayerAssignment.LeftSkeleton);
            Player.DrawHands = true;

            AddEntity(Player);

            AddCurtain();

            int logoWidth = 350;
            int logoHeight = 357;

            var logo = new SimpleGraphic(Assets.MenuLogo, (MainGame.Width / 2) - logoWidth / 2, ((MainGame.Height / 2) - logoHeight / 2) - 100, logoWidth, logoHeight);
            AddEntity(logo);

            MainMenu.AddItem(new MenuItem(Assets.MenuSignMultiPlayer, 0, 0, OnClick_Multiplayer));
            MainMenu.AddItem(new MenuItem(Assets.MenuSignSinglePlayer, 0, 0, OnClick_SettingsSinglePlayer));
            //MainMenu.AddItem(new MenuItem(Assets.MenuSignHighscore, 0, 0, OnClick_Highscore));
            MainMenu.AddItem(new MenuItem(Assets.MenuSignHelp, 0, 0, OnClick_Help));

            LoadMenu(MainMenu);

            //var exit = new MenuButton(Assets.MenuButtonExit, (MainGame.Width / 2) - 65, MainGame.Height - 150, OnClick_Exit);
            //AddEntity(exit);
        }
Example #2
0
        public override void Init()
        {
            base.Init();

            AddCurtain();

            Player = new Player(Context, SkeletonPlayerAssignment.LeftSkeleton);
            Player.DrawHands = true;

            AddEntity(Player);

            var posX = 400;
            var posY = 235;

            var width = Assets.HighscoreBoard.Width / 2;
            var height = Assets.HighscoreBoard.Height / 2;

            var board = new SimpleGraphic(Assets.HighscoreBoard, (MainGame.Width / 2) - width / 2, (MainGame.Height / 2) - (height / 2) - 50, width, height);
            AddEntity(board);

            foreach (Score s in Scores.Take(3)) {
                var hi = new HighscoreItem(posX, posY, s);
                AddEntity(hi);

                posY += 145;
            }

            var menuSign = new MenuItem(Assets.SignMenu, (MainGame.Width / 2) - 100, (MainGame.Height) - 125, delegate() { Manager.SwitchScreen(new MenuScreen(Context)); });
            AddEntity(menuSign);
        }
Example #3
0
 public void AddTime()
 {
     Value += 5f;
     var plusFive = new SimpleGraphic(Assets.ClockAddFive, (int)X, (int)Y, 92, 67);
     Screen.AddEntity(plusFive);
     plusFive.Actions.AddAction(new TweenPositionTo(plusFive, new Vector2(plusFive.X, plusFive.Y + 100), 1f, Bounce.EaseOut), true);
     plusFive.Actions.AddAction(new CallFunction(delegate() { Screen.RemoveEntity(plusFive); }), false);
 }
Example #4
0
 public void SubtractPoints()
 {
     Value -= 5;
     var minusFive = new SimpleGraphic(Assets.ClockSubtractFive, X, Y, 92, 67);
     Screen.AddEntity(minusFive);
     minusFive.Actions.AddAction(new TweenPositionTo(minusFive, new Vector2(minusFive.X, minusFive.Y + 100), 1f, Bounce.EaseOut), true);
     minusFive.Actions.AddAction(new CallFunction(delegate() { Screen.RemoveEntity(minusFive); }), false);
 }
        public void AddPauseScreen()
        {
            var pauseScreen = new PauseScreen(Context);
            var sil1 = new SimpleGraphic(Assets.PlayerSilhouette, 250, 75, 480, 588);
            var sil2 = new SimpleGraphic(Assets.PlayerSilhouette, 650, 75, 480, 588);
            pauseScreen.AddEntity(sil1);
            pauseScreen.AddEntity(sil2);
            pauseScreen.WaitForPlayerCount(NeededPlayerCount);

            Manager.AddScreen(pauseScreen);
        }
Example #6
0
        public void AddCurtain()
        {
            CurtainLeft = new SimpleGraphic(Assets.CurtainTopLeft, 0, 0, 260, MainGame.Height - 50);
            CurtainRight = new SimpleGraphic(Assets.CurtainTopRight, MainGame.Width - 260, 0, 260, MainGame.Height - 50);

            BackgroundLeft = new SimpleGraphic(Assets.CurtainBottomLeft, 0, 0, (MainGame.Width / 2) + 10, MainGame.Height + 20);
            BackgroundRight = new SimpleGraphic(Assets.CurtainBottomRight, (MainGame.Width / 2) - 10, 0, (MainGame.Width / 2) + 10, MainGame.Height + 20);

            BackgroundLeft.ZDepth = BackgroundRight.ZDepth = -1;

            AddEntity(BackgroundLeft);
            AddEntity(BackgroundRight);

            AddEntity(CurtainLeft);
            AddEntity(CurtainRight);
        }
        SimpleGraphic getMessage(Texture2D texture)
        {
            var msg = new SimpleGraphic(texture, (MainGame.Width / 2) - (texture.Width / 6), MainGame.Height, texture.Width / 3, texture.Height / 3);

            return msg;
        }