예제 #1
0
        protected override void OnRegistered()
        {
            Layer2D back = new Layer2D();
            Layer2D text = new Layer2D();

            // 背景を設定する
            back.AddPostEffect(
                new Background(
                    new Vector3DF(0.0f, 0.4f, 1.0f),
                    new Vector3DF(0.4f, 0.7f, 1.0f)
                    )
                );

            // テキストの中心座標をオブジェクトの中心にする
            Vector2DF center = new Vector2DF(0.5f, 0.5f);

            // 「Aero Groovers」
            AGText title = new AGText(120, 4, center);

            title.SetText("Aero Groovers");
            title.Position = new Vector2DF(640, 150);
            text.AddObject(title);

            // 「Press Any Button.」
            AGText announce = new AGText(72, 4, center);

            announce.SetText("Press Any Button.");
            announce.Position = new Vector2DF(640, 600);
            text.AddObject(announce);

            // レイヤーを追加する
            AddLayer(back);
            AddLayer(text);
        }
예제 #2
0
        protected override void OnSceneRegistered()
        {
            var back       = new BackGround(ShaderPath);
            var back_layer = new Layer2D {
                DrawingPriority = 0
            };

            back_layer.AddPostEffect(back);
            Owner.AddLayer(back_layer);
        }
예제 #3
0
        public GameScene()
        {
            Layer2D back = new Layer2D();

            back.AddPostEffect(
                new Background(
                    new Vector3DF(1.0f, 1.0f, 0.0f),
                    new Vector3DF(1.0f, 1.0f, 0.6f)
                    )
                );

            AddLayer(back);

            Skill.Game = Game;

            for (int i = 0; i < 4; ++i)
            {
                if (Game.Player[i] != null)
                {
                    // プレイヤー情報を初期化
                    var d = Game.Player[i].Difficulty;
                    var c = Game.Score.Notes[d].Count;
                    Game.Player[i].Initialize(c);

                    AddLayer(new PlayLayer(i));
                    AddLayer(new UILayer(i));
                }
            }

            // あらかじめポーズのためにレイヤーを用意
            PauseLayer.AddObject(new PauseWindow {
                Resume = Resume
            });

            PauseLayer.AddObject(new GeometryObject2D
            {
                Shape = new RectangleShape {
                    DrawingArea = new RectF(0, 0, 1280, 800)
                },
                Color = new Color(0, 0, 0, 127)
            });

            EffectLayer.DrawingPriority = 9;
            AddLayer(EffectLayer);
            AddLayer(PauseLayer);

            // ゲームを初期化
            Reset();
        }
예제 #4
0
        protected override void OnStart()
        {
            var scene = new Scene();
            var layer = new Layer2D();
            var obj   = new TextureObject2D()
            {
                Texture = Engine.Graphics.CreateTexture2D("Data/Texture/Sample1.png"),
            };

            obj.Scale = new Vector2DF(2.0f, 2.0f);

            layer.AddObject(obj);
            layer.AddPostEffect(new PostEffect(Engine.Graphics));
            scene.AddLayer(layer);

            Engine.ChangeScene(scene);
        }
예제 #5
0
        protected override void OnRegistered()
        {
            Layer2D back   = new Layer2D();
            Layer2D text   = new Layer2D();
            Layer2D window = new Layer2D();

            // 背景を設定する
            back.AddPostEffect(
                new Background(
                    new Vector3DF(0.0f, 0.4f, 1.0f),
                    new Vector3DF(0.4f, 0.7f, 1.0f)
                    )
                );

            // テキストの中心座標をオブジェクトの中心にする
            Vector2DF center = new Vector2DF(0.5f, 0.5f);

            // 「ENTRY」
            AGText title = new AGText(72, 4, center);

            title.SetText("ENTRY");
            title.Position = new Vector2DF(640, 70);
            text.AddObject(title);

            // 「コントローラーを登録します。準備ができたらスタートボタンを長押ししてください。」
            AGText announce = new AGText(36, 4, center);

            announce.SetText("コントローラーを登録します。\n準備ができたらスタートボタンを長押ししてください。");
            announce.Position = new Vector2DF(640, 720);
            text.AddObject(announce);

            // ウィンドウを追加する
            for (int i = 1; i <= 4; ++i)
            {
                window.AddObject(new EntryWindow(i)
                {
                    NoisyValue = 0.025f
                });
            }

            // レイヤーを追加する
            AddLayer(back);
            AddLayer(text);
            AddLayer(window);
        }
예제 #6
0
        protected override void OnRegistered()
        {
            // 譜面を読み込む
            Game.LoadScore();

            Layer2D back = new Layer2D();

            // 背景の設定
            back.AddPostEffect(
                new Background(
                    new Vector3DF(0.4f, 1.0f, 0.0f),
                    new Vector3DF(0.7f, 1.0f, 0.4f)
                    )
                );

            AddLayer(back);
            AddLayer(new ImageLayer());
            AddLayer(new TextLayer());
        }
예제 #7
0
        protected override void OnRegistered()
        {
            Layer2D back   = new Layer2D();
            Layer2D text   = new Layer2D();
            Layer2D window = new Layer2D();

            // 背景を設定する
            back.AddPostEffect(
                new Background(
                    new Vector3DF(1.0f, 1.0f, 0.0f),
                    new Vector3DF(1.0f, 1.0f, 0.6f)
                    )
                );

            // テキストの中心座標をオブジェクトの中心にする
            Vector2DF center = new Vector2DF(0.5f, 0.5f);

            // 「RESULT」
            AGText title = new AGText(72, 4, center);

            title.SetText("RESULT");
            title.Position = new Vector2DF(640, 70);
            text.AddObject(title);

            // ウィンドウを追加する
            for (int i = 1; i <= 4; ++i)
            {
                if (Game.Player[i - 1] != null)
                {
                    window.AddObject(new ResultWindow(i)
                    {
                        NoisyValue = 0.025f
                    });
                }
            }

            // レイヤーを追加する
            AddLayer(back);
            AddLayer(text);
            AddLayer(window);
        }
예제 #8
0
        protected override void OnRegistered()
        {
            Layer2D back   = new Layer2D();
            Layer2D text   = new Layer2D();
            Layer2D window = new Layer2D();

            // 背景の設定
            back.AddPostEffect(
                new Background(
                    new Vector3DF(0.4f, 1.0f, 0.0f),
                    new Vector3DF(0.7f, 1.0f, 0.4f)
                    )
                );

            // テキストオブジェクトの生成・追加
            AGText title = new AGText(72, 4, new Vector2DF(0.5f, 0.5f));

            title.Position = new Vector2DF(640, 70);
            title.SetText("OPTION");

            text.AddObject(title);

            // ウィンドウの追加
            for (int i = 0; i < 4; ++i)
            {
                if (Game.Player[i] != null)
                {
                    var w = new OptionWidnow(i + 1);
                    w.NoisyValue = 0.025f;
                    window.AddObject(w);
                    Windows.Add(w);
                }
            }

            AddLayer(back);
            AddLayer(text);
            AddLayer(window);
        }
예제 #9
0
        public void Run()
        {
            Engine.Initialize("CustomPostEffect", 640, 480, new EngineOption());

            var scene = new Scene();
            var layer = new Layer2D();
            var obj   = new TextureObject2D()
            {
                Texture = Engine.Graphics.CreateTexture2D("Data/Texture/Sample1.png"),
            };

            layer.AddObject(obj);
            layer.AddPostEffect(new PostEffect(Engine.Graphics));
            scene.AddLayer(layer);
            Engine.ChangeScene(scene);

            while (Engine.DoEvents())
            {
                Engine.Update();
            }

            Engine.Terminate();
        }