Example #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);
        }
Example #2
0
            public UILayer(int i)
            {
                DrawingPriority = 5;

                // プレイヤーの紐付け
                Player = Game.Player[i];

                // テキストの配置
                AddObject(Score_text = new AGText(36, 4, new Vector2DF(0.5f, 0.5f))
                {
                    Position = new Vector2DF(310 * Player.PlayerNumber - 135, 80)
                });
                Score_text.SetText(0.ToString("0000000"));

                // ゲージの配置
                AddObject(new ClearGauge(Player.Character)
                {
                    Position = new Vector2DF(310 * i + 40, 690)
                });
                AddObject(new SkillGauge(Player.Character.Skills[0])
                {
                    Position = new Vector2DF(310 * i + 160, 570)
                });
                AddObject(new SkillGauge(Player.Character.Skills[1])
                {
                    Position = new Vector2DF(310 * i + 160, 610)
                });
                AddObject(new SkillGauge(Player.Character.Skills[2])
                {
                    Position = new Vector2DF(310 * i + 160, 650)
                });

                Player.Character.Skills[0].AddEffect =
                    () => ((GameScene)Scene).EffectLayer.AddObject(
                        new GaugeEffect(
                            Player.Character.Skills[0].SkillType,
                            new Vector2DF(310 * i + 235, 590)
                            )
                        );
                Player.Character.Skills[1].AddEffect =
                    () => ((GameScene)Scene).EffectLayer.AddObject(
                        new GaugeEffect(
                            Player.Character.Skills[1].SkillType,
                            new Vector2DF(310 * i + 235, 630)
                            )
                        );
                Player.Character.Skills[2].AddEffect =
                    () => ((GameScene)Scene).EffectLayer.AddObject(
                        new GaugeEffect(
                            Player.Character.Skills[2].SkillType,
                            new Vector2DF(310 * i + 235, 670)
                            )
                        );
            }
Example #3
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);
        }
Example #4
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);
        }
Example #5
0
            public ComboText(int player) : base(96, 0, center)
            {
                Player = Game.Player[player - 1];

                Color    = new Color(255, 255, 255, 0);
                Text     = Player.Combo.ToString();
                Position = new Vector2DF(310 * player - 135, 220);

                ComboLabel = new AGText(36, 0, center)
                {
                    Color    = new Color(255, 255, 255, 0),
                    Position = new Vector2DF(0, 70)
                };
                ComboLabel.SetText("COMBO");

                // 子オブジェクトの追加
                var management = ChildManagementMode.RegistrationToLayer;
                var transform  = ChildTransformingMode.All;

                AddChild(ComboLabel, management, transform);
            }
Example #6
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);
        }
Example #7
0
            public OptionWidnow(int player_number) : base(270, 540)
            {
                // プレイヤーを設定
                Player     = Game.Player[player_number - 1];
                Controller = (Controller)Player.Controller;

                // 引数に指定されたプレイヤー番号に応じてウィンドウの色を変える
                switch (player_number)
                {
                case 1: Color = new Color(87, 209, 235); break;

                case 2: Color = new Color(245, 0, 94); break;

                case 3: Color = new Color(151, 225, 36); break;

                case 4: Color = new Color(224, 213, 97); break;
                }

                // ウィンドウの位置を変更する
                Position = new Vector2DF(310 * player_number - 266, 175);

                AGText player_l = new AGText(36, 0, center)
                {
                    Position = new Vector2DF(135, 40)
                };

                player_l.SetText("Player " + player_number);

                // オブジェクトを追加
                AddObjects
                (
                    player_l,
                    Difficulty_l,
                    Difficulty_v,
                    HighSpeed_l,
                    HighSpeed_v,
                    Character_l,
                    Character_v,
                    Ready
                );

                if (Player.Character == null)
                {
                    Player.Character = new Kanon(Player);
                    CharacterIndex   = 0;
                }
                else
                {
                    switch (Player.Character.GetType().Name)
                    {
                    case "Kanon": CharacterIndex = 0; break;

                    case "Rimu": CharacterIndex = 1; break;

                    case "Rintaro": CharacterIndex = 2; break;

                    case "Kakeru": CharacterIndex = 3; break;
                    }
                }

                // テキストの設定
                Difficulty_l.SetText("< Difficulty >");
                HighSpeed_l.SetText("< High Speed >");
                Character_l.SetText("< Artifact >");
                Ready.SetText("READY");

                Difficulty_v.SetText(Player.Difficulty.ToString());
                HighSpeed_v.SetText(Player.HighSpeed.ToString());

                // キャラクターの画像を設定する
                Character_v.Texture        = Engine.Graphics.CreateTexture2D(Player.Character.Image);
                Character_v.CenterPosition = Character_v.Texture.Size.To2DF() * 0.5f;
                Character_v.Position       = new Vector2DF(135, 355);

                Character = Player.Character;
            }