Esempio n. 1
0
        public override void InitializeScene()
        {
            base.InitializeScene();
            var    texture  = Texture.Get("sprite_main_menu_buttons");
            double x_center = (ViewWidth) * 0.5;
            double y_center = (ViewHeight) * 0.5;

            new SpriteBase(HUD, x_center, y_center + 128, Texture.Get("sprite_android_now")).CenterShift();
            ((UIButton) new UIButton(this, x_center, y_center,
                                     new SpriteBase.SpriteFrame(texture, 4),
                                     new SpriteBase.SpriteFrame(texture, 2), UIGroup).CenterShift()).Action += (sender, e) =>
            {
                _Game.CurrentScene = (Scene)_Game.Scenes[(string)Configuration.Get("SceneBeginning")];
            };
            ((UIButton) new UIButton(this, x_center, y_center - 48,
                                     new SpriteBase.SpriteFrame(texture, 5),
                                     new SpriteBase.SpriteFrame(texture, 3), UIGroup).CenterShift()).Action += (sender, e) =>
            {
                _Game.CurrentScene = (Scene)_Game.Scenes["SceneCredits"];
            };
            new SpriteBase(HUD, x_center, y_center - 128, Texture.Get("sprite_infogfx_start")).CenterShift();

            var looper = new MusicLooper_LessHackish(this);

            stuff_one = new StuffOne(Background, 0.5 * ViewWidth, 0, -100, (int)ViewWidth / 20 + 1, (int)ViewHeight / 30 + 1);
            stuff_two = new StuffTwo(Background, 0.5 * ViewWidth, 0, -200, (int)ViewWidth / 20 + 1, (int)ViewHeight / 30 + 1);

            SceneEntry += (sender, e) => {
                _ViewPosition = Vector3d.Zero;
                //stuff_one.StuffTimer.Restart();
                //stuff_two.StuffTimer.Restart();
            };
        }
Esempio n. 2
0
        public override void InitializeScene()
        {
            base.InitializeScene();
            var texture = Texture.Get ("sprite_main_menu_buttons");
            double x_center = (ViewWidth) * 0.5;
            double y_center = (ViewHeight) * 0.5;
            new SpriteBase(HUD, x_center, y_center + 128, Texture.Get("sprite_android_now")).CenterShift();
            ((UIButton) new UIButton(this, x_center, y_center,
                         new SpriteBase.SpriteFrame(texture, 4),
                         new SpriteBase.SpriteFrame(texture, 2), UIGroup).CenterShift()).Action += (sender, e) =>
            {
                _Game.CurrentScene = (Scene)_Game.Scenes[(string)Configuration.Get("SceneBeginning")];
            };
            ((UIButton) new UIButton(this, x_center, y_center - 48,
                         new SpriteBase.SpriteFrame(texture, 5),
                                     new SpriteBase.SpriteFrame(texture, 3), UIGroup).CenterShift()).Action += (sender, e) =>
            {
                _Game.CurrentScene = (Scene)_Game.Scenes["SceneCredits"];
            };
            new SpriteBase(HUD, x_center, y_center - 128, Texture.Get ("sprite_infogfx_start")).CenterShift();

            var looper = new MusicLooper_LessHackish(this);
            stuff_one = new StuffOne(Background, 0.5 * ViewWidth, 0, -100, (int)ViewWidth / 20 + 1, (int)ViewHeight / 30 + 1);
            stuff_two = new StuffTwo(Background, 0.5 * ViewWidth, 0, -200, (int)ViewWidth / 20 + 1, (int)ViewHeight / 30 + 1);

            SceneEntry += (sender, e) => {
                _ViewPosition = Vector3d.Zero;
                //stuff_one.StuffTimer.Restart();
                //stuff_two.StuffTimer.Restart();
            };
        }