Beispiel #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_SinglePlayer));
            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);
        }
        public override void Init()
        {
            base.Init();

            Manager.FadeInSong(Assets.GameSong, true, 0.2f);

            AddCurtain();
            OpenCurtain();

            AddPlayers();

            MainClock = new Clock(20, 20, 90);
            MainClock.Paused = true;

            AddEntity(MainClock);

            Score = new ScoreSign(MainGame.Width - 190, 25);
            Score.Value = 0;
            AddEntity(Score);

            Coroutines.Start(LoadNumbersFromFile());

            AddInput();

            var posPause = new Vector2(MainGame.Width - 230, (MainGame.Height) - 300);

            var pause = new MenuButton(Assets.ButtonPause, (int)posPause.X, (int)posPause.Y, delegate() { paused = true; });
            AddEntity(pause);

            if (!Configuration.GRABBING_ENABLED) {
                AddEntity(new Scissors(120, MainGame.Height - 350, Scissors.ScissorPosition.Left));
                AddEntity(new Scissors(MainGame.Width - 120, MainGame.Height - 350, Scissors.ScissorPosition.Right));
            }
        }
        public override void Init()
        {
            Manager.FadeInSong(Assets.GameSong, true, 0.2f);

            AddCurtain();
            OpenCurtain();

            PlayerOne = new Player(Context, SkeletonPlayerAssignment.LeftSkeleton);
            PlayerTwo = new Player(Context, SkeletonPlayerAssignment.RightSkeleton);

            CurrentPlayer = PlayerOne;

            AddEntity(PlayerOne);
            AddEntity(PlayerTwo);

            PlayerOneClock = new Clock(20, 20, 90);
            PlayerTwoClock = new Clock(MainGame.Width - 130, 20, 90);

            PlayerTwoClock.Paused = true;

            AddEntity(PlayerOneClock);
            AddEntity(PlayerTwoClock);

            Coroutines.Start(LoadNumbersFromFile());

            AddInput();

            var posPause = new Vector2(MainGame.Width - 230, (MainGame.Height) - 300);

            var pause = new MenuButton(Assets.ButtonPause, (int)posPause.X, (int)posPause.Y, delegate() { paused = true; });
            AddEntity(pause);

            if (!Configuration.GRABBING_ENABLED) {
                AddEntity(new Scissors(120, MainGame.Height - 350, Scissors.ScissorPosition.Left));
                AddEntity(new Scissors(MainGame.Width - 120, MainGame.Height - 350, Scissors.ScissorPosition.Right));
            }

            base.Init();
        }