コード例 #1
0
            public EntryWindow(int player_number) : base(270, 100)
            {
                // 番号を設定する
                PlayerNumber = player_number;

                // ウィンドウの今の状態
                CurrentState = WindowState.Closing;

                // 引数に指定されたプレイヤー番号に応じてウィンドウの色を変える
                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);

                // ウィンドウに表示するテキストを変更する
                press_a.SetText("決定ボタンで参加");
                playr_l.SetText("Player " + PlayerNumber);
                style_l.SetText("< Play Style >");
                style_v.SetText("");
                check_l.SetText("< Button Check >");
                press_b.SetText("キャンセルボタン\n長押しで登録解除");

                check[Button.A].SetText("A");
                check[Button.B].SetText("B");
                check[Button.X].SetText("X");
                check[Button.Y].SetText("Y");
                check[Button.L].SetText("L");
                check[Button.R].SetText("R");
                check[Button.Up].SetText("↑");
                check[Button.Down].SetText("↓");
                check[Button.Left].SetText("←");
                check[Button.Right].SetText("→");
                check[Button.Start].SetText("Start");
                check[Button.Select].SetText("Select");

                // オブジェクトを追加する
                AddObjects(press_a, playr_l, style_l, style_v, check_l, press_b);
                foreach (var pair in check)
                {
                    AddObject(pair.Value);
                }
                AddObject(Gauge);
            }
コード例 #2
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);
        }
コード例 #3
0
 protected override void OnUpdated()
 {
     Title.SetText(Game.Score.Title);
     Subtitle.SetText(Game.Score.Subtitle);
     Novice_v.SetText(Game.Score.Level[Difficulty.Novice].ToString());
     Medium_v.SetText(Game.Score.Level[Difficulty.Medium].ToString());
     Expert_v.SetText(Game.Score.Level[Difficulty.Expert].ToString());
 }
コード例 #4
0
ファイル: UILayer.cs プロジェクト: GCLemon/AeroGroovers
            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)
                            )
                        );
            }
コード例 #5
0
ファイル: EntryScene.cs プロジェクト: GCLemon/AeroGroovers
        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 OnAdded()
            {
                Head.SetText("TUNE SELECT");
                Novice_l.SetText("NOVICE");
                Medium_l.SetText("MEDIUM");
                Expert_l.SetText("EXPERT");

                // テキストオブジェクトの追加
                AddObject(Head);
                AddObject(Title);
                AddObject(Subtitle);
                AddObject(Novice_v);
                AddObject(Medium_v);
                AddObject(Expert_v);
                AddObject(Novice_l);
                AddObject(Medium_l);
                AddObject(Expert_l);
            }
コード例 #7
0
ファイル: ResultScene.cs プロジェクト: GCLemon/AeroGroovers
        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
            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);
            }
コード例 #9
0
ファイル: OptionScene.cs プロジェクト: GCLemon/AeroGroovers
        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);
        }
コード例 #10
0
            public PauseWindow() : base(360, 300)
            {
                NoisyValue = 0.025f;
                Position   = new Vector2DF(440, 280);
                Color      = new Color(127, 127, 127);

                pause.SetText("PAUSE");
                resume.SetText("Resume");
                retry.SetText("Retry");
                select.SetText("Tune Select");

                pause.Position  = new Vector2DF(180, 50);
                resume.Position = new Vector2DF(180, 130);
                retry.Position  = new Vector2DF(180, 180);
                select.Position = new Vector2DF(180, 230);

                AddObjects
                (
                    pause,
                    resume,
                    retry,
                    select
                );
            }
コード例 #11
0
ファイル: UILayer.cs プロジェクト: GCLemon/AeroGroovers
 protected override void OnUpdated()
 {
     Score_text.SetText(Player.Score.ToString("0000000"));
 }
コード例 #12
0
            public ResultWindow(int player_number) : base(270, 540)
            {
                // 引数に指定されたプレイヤー番号に応じてウィンドウの色を変える
                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);

                // プレイヤーの取得
                Player player = Game.Player[player_number - 1];

                Gauge          = new ClearGauge(player.Character);
                Gauge.Position = new Vector2DF(27, 260);

                Player.SetText("Player " + player_number);

                JustShoot.SetText(player.JustShoot.ToString("JustShoot : 0"));
                Shoot.SetText(player.Shoot.ToString("Shoot : 0"));
                Hit.SetText(player.Hit.ToString("Hit : 0"));
                Miss.SetText(player.Miss.ToString("Miss : 0"));
                MaxCombo.SetText(player.BestCombo.ToString("Max Combo : 0"));

                GaugePoint_L.SetText("Clear Gauge");
                GaugePoint_V.SetText
                (
                    player.ClearJudge == ClearJudge.Failure ? "Failed : " : "Cleared : "
                    + (player.ClearPoint * 0.0001).ToString("0") + "%"
                );

                Score_L.SetText("Total Score");
                Score_V.SetText(player.Score.ToString("000000"));

                Rank.SetText("Rank : " + player.Rank.ToString());

                int place   = 1;
                var players = Game.Player.Where(p => p != null && p != player);

                foreach (Player p in players)
                {
                    if (p.Score > player.Score)
                    {
                        ++place;
                    }
                }

                switch (place)
                {
                case 1: Place.SetText("1st"); break;

                case 2: Place.SetText("2nd"); break;

                case 3: Place.SetText("3rd"); break;

                case 4: Place.SetText("4th"); break;
                }

                AddObjects
                (
                    Player,
                    JustShoot,
                    Shoot,
                    Hit,
                    Miss,
                    MaxCombo,
                    GaugePoint_L,
                    Gauge,
                    GaugePoint_V,
                    Score_L,
                    Score_V,
                    Rank,
                    Place
                );
            }
コード例 #13
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;
            }