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_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);
        }
Beispiel #2
0
        public DefaultState(DragableNumber owner)
        {
            Owner = owner;

            defaultMoveTweener = new Tweener(owner.Y, owner.Y + 5, 1f, ClownSchool.Tweening.Quadratic.EaseInOut);
            defaultMoveTweener.Ended += delegate() { defaultMoveTweener.Reverse(); };
        }
Beispiel #3
0
        public SplashScreen(KinectContext context, Texture2D graphic, float duration)
            : base(context)
        {
            Graphic = graphic;
            Duration = duration;

            alphaTweener = new Tweener(alpha, 1, duration, Linear.EaseIn);
            alphaTweener.Ended += delegate() { alphaTweener.Reverse(); tweenCount++; };
        }
Beispiel #4
0
        public void TakePicture(int score)
        {
            Assets.CameraClick.Play();
            var filename = Path.Combine(SaveTo, score.ToString());
            Screen.Manager.Game.SaveScreenshot(filename);

            flash = new Tweener(0f, 1f, 0.2f, Linear.EaseIn);
            flash.Ended += delegate() {
                flash = new Tweener(1f, 0f, 1f, Linear.EaseIn);
                flash.Ended += delegate() { Screen.RemoveEntity(this); };
            };
        }
        void initTweeners()
        {
            tweenerX = new Tweener(entity.X, to.X, duration, tween);
            tweenerY = new Tweener(entity.Y, to.Y, duration, tween);

            tweenerX.Ended += delegate() { tweenerXFinished = true; };
            tweenerY.Ended += delegate() { tweenerYFinished = true; };
        }