Exemple #1
0
            public ComboInternal(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager) : base(device)
            {
                display = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("num.png"))
                {
                    Position  = Vector2.Zero,
                    Alignment = PPDFramework.Alignment.Left,
                    MaxDigit  = -1
                };
                display.Hidden = true;

                var filenames = new string[] {
                    "cool.png",
                    "good.png",
                    "safe.png",
                    "sad.png",
                    "worst.png",
                    "misscool.png",
                    "missgood.png",
                    "misssafe.png",
                    "misssad.png"
                };

                evals = new PictureObject[filenames.Length];
                for (int i = 0; i < filenames.Length; i++)
                {
                    evals[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("eva", filenames[i]), true)
                    {
                        Hidden = true
                    };
                    this.AddChild(evals[i]);
                }

                this.AddChild(display);
            }
Exemple #2
0
 public Score(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager) : base(device)
 {
     display = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
     {
         Position  = new Vector2(790, 5),
         Alignment = Alignment.Right,
         MaxDigit  = 7
     };
     this.AddChild(display);
 }
Exemple #3
0
            public SlidePoint(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, int score) : base(device)
            {
                NumberPictureObject num;

                this.AddChild(num = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("slide", "slide_point.png"))
                {
                    Position  = Vector2.Zero,
                    Alignment = Alignment.Left,
                    MaxDigit  = -1,
                    Value     = (uint)score
                });
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("slide", "slide_point_plus.png"))
                {
                    Position = new Vector2(-num.DigitWidth, 0)
                });
            }
Exemple #4
0
            public MaxSlidePoint(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, int score) : base(device)
            {
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("slide", "max_slide.png"), true));
                NumberPictureObject num;

                this.AddChild(num = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("slide", "slide_point.png"))
                {
                    Position  = new Vector2(0, 5),
                    Alignment = Alignment.Left,
                    MaxDigit  = -1,
                    Value     = (uint)score
                });
                num.Position = new Vector2(-num.DigitWidth * score.ToString().Length / 2f, num.Position.Y);
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("slide", "slide_point_plus.png"))
                {
                    Position = new Vector2(-num.DigitWidth + num.Position.X, num.Position.Y)
                });
            }
Exemple #5
0
        public LeftMenu(PPDDevice device, IGameHost gameHost, PPDFramework.Resource.ResourceManager resourceManager, DxTextBox textBox, SelectSongManager ssm, ISound sound) : base(device)
        {
            this.gameHost        = gameHost;
            this.resourceManager = resourceManager;
            this.sound           = sound;
            this.textBox         = textBox;
            this.ssm             = ssm;

            scoreUpdateCountBack = new PictureObject(device, resourceManager, Utility.Path.Combine("update_count_back.png"))
            {
                Position = new Vector2(20, 90),
                Hidden   = true,
                Alpha    = 0.75f
            };
            scoreUpdateCountBack.AddChild(scoreUpdateCount = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("result", "scoresmall.png"))
            {
                Position  = new Vector2(17, 5),
                Alignment = PPDFramework.Alignment.Center,
                MaxDigit  = -1,
                Scale     = new Vector2(0.75f)
            });
            modUpdateCountBack = new PictureObject(device, resourceManager, Utility.Path.Combine("update_count_back.png"))
            {
                Position = new Vector2(20, 330),
                Hidden   = true,
                Alpha    = 0.75f
            };
            modUpdateCountBack.AddChild(modUpdateCount = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("result", "scoresmall.png"))
            {
                Position  = new Vector2(17, 5),
                Alignment = PPDFramework.Alignment.Center,
                MaxDigit  = -1,
                Scale     = new Vector2(0.75f)
            });
            WebSongInformationManager.Instance.Updated += Instance_Updated;
            WebSongInformationManager.Instance.Update(true);

            this.Inputed    += LeftMenu_Inputed;
            this.GotFocused += LeftMenu_GotFocused;
        }
Exemple #6
0
        private void InnerStruct()
        {
            Hidden          = true;
            itemPictureDict = new Dictionary <ItemEffect, PictureObject>();

            this.AddChild(itemSprite = new SpriteObject(device)
            {
                Position = new SharpDX.Vector2(92, 1)
            });
            this.AddChild((userIcon = new PictureObject(device, resourceManager, PathObject.Absolute(currentUserIconPath), true)
            {
                Position = new Vector2(19, 19)
            }));
            this.AddChild((userNameString = new TextureString(device, "", 9, 75, PPDColors.White)
            {
                Position = new Vector2(35, 3)
            }));
            this.AddChild(scorePicture = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("play_user_score.png"))
            {
                Position  = new Vector2(35, 24),
                Alignment = Alignment.Left,
                MaxDigit  = 7
            });

            var filenames = new string[] {
                "cool.png",
                "good.png",
                "safe.png",
                "sad.png",
                "worst.png",
                "misscool.png",
                "missgood.png"
            };

            evals = new PictureObject[filenames.Length];
            for (int i = 0; i < filenames.Length; i++)
            {
                evals[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("eva", filenames[i]))
                {
                    Position = new Vector2(35, 14),
                    Hidden   = true,
                    Scale    = new SharpDX.Vector2(0.4f, 0.4f)
                };
                this.AddChild(evals[i]);
            }
            this.AddChild(lifeGage = new LifeGage(device, resourceManager)
            {
                Position = new SharpDX.Vector2(37, 32)
            });

            if (userPlayState.User.IsSelf)
            {
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("play_user_back_self.png")));
            }
            else
            {
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("play_user_back.png")));
            }

            AddBinding(new Binding(userPlayState.User, "Name", this, "UserName"));
            AddBinding(new Binding(userPlayState.User, "ImagePath", this, "UserImagePath"));
            AddBinding(new Binding(userPlayState, "Score", this, "Score"));
            AddBinding(new Binding(userPlayState, "Evaluate", this, "Evaluate"));
            AddBinding(new Binding(userPlayState, "LifeAsFloat", this, "LifeAsFloat"));
            AddBinding(new Binding(userPlayState, "IsStealth", this, "IsStealth"));
            AddBinding(new Binding(userPlayState, "Loaded", this, "Loaded"));

            ChangeUserIconScale();
        }
Exemple #7
0
        public HoldManager(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager) : base(device)
        {
            pressingButtons = new bool[10];
            pressingInfos   = new PressInfo[10];

            marks    = new PictureObject[10];
            marks[0] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "sikakuc.png"), true);
            marks[1] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "batuc.png"), true);
            marks[2] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "maruc.png"), true);
            marks[3] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "sankakuc.png"), true);
            marks[4] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "hidaric.png"), true);
            marks[5] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "sitac.png"), true);
            marks[6] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "migic.png"), true);
            marks[7] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "uec.png"), true);
            marks[8] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "Rc.png"), true);
            marks[9] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "Lc.png"), true);
            for (int i = 0; i < marks.Length; i++)
            {
                marks[i].Position = new Vector2(385 + 17 * i, 336);
                this.AddChild(marks[i]);
            }
            this.AddChild(maxplus = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "maxplus.png"))
            {
                Position = new Vector2(0, 354)
            });
            this.AddChild(maxnumber = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("hold", "maxnumber.png"))
            {
                Position  = new Vector2(550, 352),
                Alignment = Alignment.Right,
                MaxDigit  = -1
            });
            this.AddChild(holdbonus = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "holdbonus.png"), true)
            {
                Position = new Vector2(345, 359)
            });
            this.AddChild(maxeffect = new EffectObject(device, resourceManager, Utility.Path.Combine("hold\\maxback.etd"))
            {
                Position = new Vector2(400, 360)
            });
            maxeffect.PlayType    = Effect2D.EffectManager.PlayType.Once;
            this.AddChild(maxback = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "maxback.png"), true)
            {
                Position = new Vector2(400, 360)
            });
            this.AddChild(holdplus = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "holdplus.png"))
            {
                Position = new Vector2(0, 327)
            });
            this.AddChild(holdnumber = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("hold", "holdnumber.png"))
            {
                Position  = new Vector2(600, 326),
                Alignment = Alignment.Right,
                MaxDigit  = -1
            });
            numbers = new PictureObject[6];
            bonuses = new PictureObject[6];
            for (int i = 1; i <= 6; i++)
            {
                numbers[i - 1] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", String.Format("{0}.png", i)), true)
                {
                    Position = new Vector2(195, 335)
                };
                bonuses[i - 1] = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", String.Format("{0}bonus.png", i)))
                {
                    Position = new Vector2(210, 325)
                };
                bonuses[i - 1].Position = new Vector2(210, (int)(337 - bonuses[i - 1].Height / 2));
                this.AddChild(numbers[i - 1]);
                this.AddChild(bonuses[i - 1]);
            }
            this.AddChild(holdeffect = new EffectObject(device, resourceManager, Utility.Path.Combine("hold\\holdback.etd"))
            {
                Position = new Vector2(400, 335)
            });
            holdeffect.PlayType    = Effect2D.EffectManager.PlayType.Once;
            this.AddChild(holdback = new PictureObject(device, resourceManager, Utility.Path.Combine("hold", "holdback.png"), true)
            {
                Position = new Vector2(400, 335)
            });

            Hide();
        }
Exemple #8
0
        public override void Load()
        {
            this.dir         = PPDGameUtility.SongInformation.DirectoryPath;
            this.diff        = PPDGameUtility.Difficulty;
            resource         = new Dictionary <string, ImageResource>();
            result           = new EffectObject[6];
            this.updatescore = !PPDGameUtility.Auto && PPDGameUtility.Profile.Index == 0;
            for (int i = 0; i < result.Length; i++)
            {
                string filename = "img\\default\\result\\";
                int    x        = 220;
                int    y        = 74;
                switch ((ResultEvaluateType)i)
                {
                case ResultEvaluateType.Mistake:
                    filename += "mistake";
                    break;

                case ResultEvaluateType.Cheap:
                    filename += "cheap";
                    break;

                case ResultEvaluateType.Standard:
                    filename += "standard";
                    break;

                case ResultEvaluateType.Great:
                    filename += "great";
                    break;

                case ResultEvaluateType.Excellent:
                    filename += "excellent";
                    break;

                case ResultEvaluateType.Perfect:
                    filename += "perfect";
                    break;
                }
                EffectObject anim = new EffectObject(filename + ".etd", x, y, resource, Device);
                anim.PlayType = Effect2D.EffectManager.PlayType.ReverseLoop;
                anim.Play();
                result[i] = anim;
            }
            string fn = "img\\default\\result\\";

            switch (diff)
            {
            case Difficulty.Easy:
                fn += "easy.png";
                break;

            case Difficulty.Normal:
                fn += "normal.png";
                break;

            case Difficulty.Hard:
                fn += "hard.png";
                break;

            case Difficulty.Extreme:
                fn += "hard.png";
                break;

            default:
                fn += "normal.png";
                break;
            }
            ImageResource temp = new ImageResource(fn, Device);

            resource.Add(fn, temp);
            difficulty      = new PictureObject(fn, 45, 105, resource, Device);
            select          = new EffectObject("img\\default\\difficulty.etd", 444, 332, resource, Device);
            select.PlayType = Effect2D.EffectManager.PlayType.Loop;
            select.Play();
            select.Alignment = EffectObject.EffectAlignment.TopLeft;
            high             = new EffectObject("img\\default\\result\\high.etd", -25, 300, resource, Device);
            high.PlayType    = Effect2D.EffectManager.PlayType.Loop;
            high.Play();
            high.Alignment = EffectObject.EffectAlignment.TopLeft;
            ImageResource pic = new ImageResource("img\\default\\result\\scoresmall.png", Device);

            resource.Add("img\\default\\result\\scoresmall.png", pic);
            scoresmalls = new NumberPictureObject[6];
            for (int i = 0; i < scoresmalls.Length; i++)
            {
                scoresmalls[i] = new NumberPictureObject("img\\default\\result\\scoresmall.png", scorex, scorey[i], NumberPictureObject.Alignment.Right, -1, resource, Device);
            }
            pic = new ImageResource("img\\default\\result\\scorebig.png", Device);
            resource.Add("img\\default\\result\\scorebig.png", pic);
            scorebig = new NumberPictureObject("img\\default\\result\\scorebig.png", scorex, scorey[6], NumberPictureObject.Alignment.Right, -1, resource, Device);
            pic      = new ImageResource("img\\default\\result\\score.png", Device);
            resource.Add("img\\default\\result\\score.png", pic);
            scoreboard = new PictureObject("img\\default\\result\\score.png", 18, 52, resource, Device);
            pic        = new ImageResource("img\\default\\result\\top.png", Device);
            resource.Add("img\\default\\result\\top.png", pic);
            top = new PictureObject("img\\default\\result\\top.png", 0, 0, resource, Device);
            pic = new ImageResource("img\\default\\result\\bottom.png", Device);
            resource.Add("img\\default\\result\\bottom.png", pic);
            bottom = new PictureObject("img\\default\\result\\bottom.png", 0, 405, false, resource, Device);
            pic    = new ImageResource("img\\default\\back.png", Device);
            resource.Add("img\\default\\back.png", pic);
            back = new PictureObject("img\\default\\back.png", 0, 0, resource, Device);
            pic  = new ImageResource("img\\default\\black.png", Device);
            resource.Add("img\\default\\black.png", pic);
            black       = new PictureObject("img\\default\\black.png", 0, 0, resource, Device);
            black.Alpha = 0;
            pic         = new ImageResource("img\\default\\difficulty.png", Device);
            resource.Add("img\\default\\difficulty.png", pic);
            selects = new PictureObject[2];
            for (int i = 0; i < selects.Length; i++)
            {
                PictureObject temppo = new PictureObject("img\\default\\difficulty.png", 520 + i * 130, 372, resource, Device);
                selects[i] = temppo;
            }
            select.Position          = new Vector2(selects[currentselect].Position.X - 4, selects[currentselect].Position.Y - 4);
            songname                 = new StringObject(PPDGameUtility.SongInformation.DirectoryName, 35, 8, 20, 500, new Color4(1, 1, 1, 1), Device, Sprite);
            songname.Position        = new Vector2(790 - songname.JustWidth, songname.Position.Y);
            difficultstring          = new StringObject(PPDGameUtility.DifficultString, 35, 105, 28, new Color4(1, 1, 1, 1), Device, Sprite);
            difficultstring.Position = new Vector2(400 - difficultstring.Width, difficultstring.Position.Y);
            retry      = new StringObject("RETRY", 535, 377, 20, new Color4(1, 1, 1, 1), Device, Sprite);
            retur      = new StringObject("RETURN", 660, 377, 20, new Color4(1, 1, 1, 1), Device, Sprite);
            ResultSet += new EventHandler(GameResult_ResultSet);
        }
Exemple #9
0
        public GameResultScore(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager,
                               PPDGameUtility ppdGameUtility, ISound sound, ITweetManager tweetManager, IReviewManager reviewManager, IGameHost gameHost) : base(device)
        {
            this.ppdGameUtility = ppdGameUtility;
            this.TweetManager   = tweetManager;
            this.ReviewManager  = reviewManager;
            this.Sound          = sound;
            this.gameHost       = gameHost;
            menuRanking         = new MenuRanking(device, resourceManager)
            {
                Position = new Vector2(455, 100)
            };
            td = new TweetDialog(device, resourceManager, sound, tweetManager);
            rd = new ReviewDialog(device, resourceManager, sound, reviewManager);
            this.AddChild(td);
            this.AddChild(rd);
            result = new EffectObject[6];
            for (int i = 0; i < result.Length; i++)
            {
                int x    = 220;
                int y    = 74;
                var anim = new EffectObject(device, resourceManager, Utility.Path.Combine("result", String.Format("{0}.etd", ((ResultEvaluateType)i).ToString().ToLower())))
                {
                    Position = new Vector2(x, y)
                };
                anim.PlayType = Effect2D.EffectManager.PlayType.ReverseLoop;
                anim.Play();
                result[i] = anim;
            }
            string filename = "";

            switch (ppdGameUtility.Difficulty)
            {
            case Difficulty.Easy:
                filename = "easy.png";
                break;

            case Difficulty.Normal:
                filename = "normal.png";
                break;

            case Difficulty.Hard:
                filename = "hard.png";
                break;

            case Difficulty.Extreme:
                filename = "extreme.png";
                break;

            default:
                filename = "normal.png";
                break;
            }
            difficulty = new PictureObject(device, resourceManager, Utility.Path.Combine("result", filename))
            {
                Position = new Vector2(45, 105)
            };
            high = new EffectObject(device, resourceManager, Utility.Path.Combine("result", "high.etd"))
            {
                Position = new Vector2(-25, 300)
            };
            high.PlayType = Effect2D.EffectManager.PlayType.Loop;
            high.Play();
            high.Alignment = EffectObject.EffectAlignment.TopLeft;
            scoresmalls    = new NumberPictureObject[6];
            for (int i = 0; i < scoresmalls.Length; i++)
            {
                scoresmalls[i] = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("result", "scoresmall.png"))
                {
                    Position  = new Vector2(scorex, scorey[i]),
                    Alignment = Alignment.Right,
                    MaxDigit  = -1
                };
            }
            scorebig = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("result", "scorebig.png"))
            {
                Position  = new Vector2(scorex, scorey[6]),
                Alignment = Alignment.Right,
                MaxDigit  = -1
            };
            scoreboard = new PictureObject(device, resourceManager, Utility.Path.Combine("result", "score.png"))
            {
                Position = new Vector2(18, 52)
            };
            scoreboard.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "cool.png"), true)
            {
                Position = new Vector2(105, 108),
                Scale    = new Vector2(0.75f, 0.75f)
            });
            scoreboard.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "good.png"), true)
            {
                Position = new Vector2(105, 138),
                Scale    = new Vector2(0.75f, 0.75f)
            });
            scoreboard.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "safe.png"), true)
            {
                Position = new Vector2(105, 168),
                Scale    = new Vector2(0.75f, 0.75f)
            });
            scoreboard.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "sad.png"), true)
            {
                Position = new Vector2(105, 198),
                Scale    = new Vector2(0.75f, 0.75f)
            });
            scoreboard.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "worst.png"), true)
            {
                Position = new Vector2(105, 228),
                Scale    = new Vector2(0.75f, 0.75f)
            });
            scoreboard.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "combo.png"), true)
            {
                Position = new Vector2(105, 258),
                Scale    = new Vector2(0.75f, 0.75f)
            });

            top = new PictureObject(device, resourceManager, Utility.Path.Combine("result", "top.png"));
            top.AddChild(new TextureString(device, Utility.Language["Result"], 20, PPDColors.White)
            {
                Position = new Vector2(70, 2)
            });
            bottom = new PictureObject(device, resourceManager, Utility.Path.Combine("result", "bottom.png"));
            bottom.AddChild(new TextureString(device, Utility.Language["Move"], 16, PPDColors.White)
            {
                Position = new Vector2(587, 21)
            });
            bottom.AddChild(new TextureString(device, Utility.Language["Decide"], 16, PPDColors.White)
            {
                Position = new Vector2(708, 21)
            });
            bottom.Position = new Vector2(0, 450 - bottom.Height + 1);
            black           = new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800
            };
            black.Alpha = 0;
            buttons     = new Button[5];
            for (int i = 0; i < buttons.Length; i++)
            {
                string text = "";
                switch (i)
                {
                case 0:
                    text = "TWEET";
                    break;

                case 1:
                    text = "REVIEW";
                    break;

                case 2:
                    text = "RETRY";
                    break;

                case 3:
                    text = "REPLAY";
                    break;

                case 4:
                    text = "RETURN";
                    break;
                }
                Vector2 pos;
                if (i >= 2)
                {
                    pos = new Vector2(500 + ((i - 2) % 3) * 100, 380);
                }
                else
                {
                    pos = new Vector2(500 + (i % 2) * 100, 340);
                }
                buttons[i] = new Button(device, resourceManager, Utility.Path, text)
                {
                    Position = pos
                };
                gridSelection.Add(pos);
                buttons[i].Selected = false;
                this.AddChild(buttons[i]);
            }
            gridSelection.Initialize();
            songname = new TextureString(device, ppdGameUtility.SongInformation.DirectoryName, 20, 500, PPDColors.White)
            {
                Position = new Vector2(35, 4)
            };
            songname.Position = new Vector2(790 - songname.JustWidth, songname.Position.Y);
            difficultstring   = new TextureString(device, ppdGameUtility.DifficultString, 24, 200, PPDColors.White)
            {
                Position    = new Vector2(35, 103),
                AllowScroll = true
            };
            difficultstring.Position = new Vector2(400 - Math.Min(200, difficultstring.Width), difficultstring.Position.Y);

            bgd = new BackGroundDisplay(device, resourceManager, "skins\\PPDSingle_BackGround.xml", "Result");

            Inputed    += GameResultScore_Inputed;
            GotFocused += GameResultScore_GotFocused;

            this.AddChild(menuRanking);
            this.AddChild(high);
            this.AddChild(difficulty);
            for (int i = 0; i < result.Length; i++)
            {
                this.AddChild(result[i]);
            }
            for (int i = 0; i < scoresmalls.Length; i++)
            {
                this.AddChild(scoresmalls[i]);
            }
            this.AddChild(scorebig);
            this.AddChild(difficultstring);
            this.AddChild(scoreboard);
            this.AddChild(songname);
            this.AddChild(top);
            this.AddChild(bottom);
            this.AddChild(bgd);

            this.InsertChild(black, 0);
        }
Exemple #10
0
        public PlayUserIcon(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, UserPlayState userPlayState,
                            bool showScore, bool showEvaluate, bool showLife) : base(device)
        {
            this.resourceManager = resourceManager;
            this.userPlayState   = userPlayState;
            this.showScore       = showScore;
            this.showEvaluate    = showEvaluate;
            this.showLife        = showLife;

            this.AddChild((userIcon = new PictureObject(device, resourceManager, PathObject.Absolute(currentUserIconPath), true)
            {
                Position = new SharpDX.Vector2(19, 19)
            }));
            this.AddChild((userNameString = new TextureString(device, "", 9, 75, PPDColors.White)
            {
                Position = new SharpDX.Vector2(35, 3)
            }));
            this.AddChild(scorePicture = new NumberPictureObject(device, resourceManager, Utility.Path.Combine("play_user_score.png"))
            {
                Position  = new SharpDX.Vector2(35, 24),
                Alignment = Alignment.Left,
                MaxDigit  = 7,
                Hidden    = !showScore
            });

            var filenames = new string[] {
                "cool.png",
                "good.png",
                "safe.png",
                "sad.png",
                "worst.png",
                "misscool.png",
                "missgood.png",
                "misssafe.png",
                "misssad.png"
            };

            evals = new PictureObject[filenames.Length];
            for (int i = 0; i < filenames.Length; i++)
            {
                evals[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("eva", filenames[i]))
                {
                    Position = new SharpDX.Vector2(35, 14),
                    Hidden   = true,
                    Scale    = new SharpDX.Vector2(0.4f, 0.4f)
                };
                this.AddChild(evals[i]);
            }
            this.AddChild(lifeGage = new LifeGage(device, resourceManager)
            {
                Position = new SharpDX.Vector2(37, 32),
                Hidden   = !showLife
            });

            if (userPlayState.User.IsSelf)
            {
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("play_user_back_self.png")));
            }
            else
            {
                this.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("play_user_back.png")));
            }

            AddBinding(new Binding(userPlayState.User, "Name", this, "UserName"));
            AddBinding(new Binding(userPlayState.User, "ImagePath", this, "UserImagePath"));
            AddBinding(new Binding(userPlayState, "Score", this, "Score"));
            AddBinding(new Binding(userPlayState, "Evaluate", this, "Evaluate"));
            AddBinding(new Binding(userPlayState, "IsMissPress", this, "IsMissPress"));
            AddBinding(new Binding(userPlayState, "LifeAsFloat", this, "LifeAsFloat"));

            ChangeUserIconScale();
        }
Exemple #11
0
        public HoldManager(Device device, PPDFramework.Resource.ResourceManager resourceManager)
        {
            this.device     = device;
            pressingButtons = new bool[10];
            pressingInfos   = new PressInfo[10];

            numbers = new PictureObject[6];
            bonuses = new PictureObject[6];
            for (int i = 1; i <= 6; i++)
            {
                numbers[i - 1]          = new PictureObject(String.Format("img\\default\\hold\\{0}.png", i), 195, 335, true, resourceManager, device);
                bonuses[i - 1]          = new PictureObject(String.Format("img\\default\\hold\\{0}bonus.png", i), 210, 325, resourceManager, device);
                bonuses[i - 1].Position = new Vector2(210, (int)(337 - bonuses[i - 1].Height / 2));
                this.AddChild(numbers[i - 1]);
                this.AddChild(bonuses[i - 1]);
            }

            holdback            = new PictureObject("img\\default\\hold\\holdback.png", 400, 335, true, resourceManager, device);
            holdeffect          = new EffectObject("img\\default\\hold\\holdback.etd", 400, 335, resourceManager, device);
            holdeffect.PlayType = Effect2D.EffectManager.PlayType.Once;

            this.AddChild(holdback);
            this.AddChild(holdeffect);

            maxback            = new PictureObject("img\\default\\hold\\maxback.png", 400, 360, true, resourceManager, device);
            maxeffect          = new EffectObject("img\\default\\hold\\maxback.etd", 400, 360, resourceManager, device);
            maxeffect.PlayType = Effect2D.EffectManager.PlayType.Once;

            this.AddChild(maxback);
            this.AddChild(maxeffect);

            holdplus = new PictureObject("img\\default\\hold\\holdplus.png", 0, 327, resourceManager, device);
            this.AddChild(holdplus);

            maxplus = new PictureObject("img\\default\\hold\\maxplus.png", 0, 354, resourceManager, device);
            this.AddChild(maxplus);

            holdbonus = new PictureObject("img\\default\\hold\\holdbonus.png", 345, 359, true, resourceManager, device);
            this.AddChild(holdbonus);

            holdnumber = new NumberPictureObject("img\\default\\hold\\holdnumber.png", 600, 326, NumberPictureObject.Alignment.Right, -1, resourceManager, device);
            this.AddChild(holdnumber);

            maxnumber = new NumberPictureObject("img\\default\\hold\\maxnumber.png", 550, 352, NumberPictureObject.Alignment.Right, -1, resourceManager, device);
            this.AddChild(maxnumber);

            marks = new PictureObject[10];

            marks[0] = new PictureObject("img\\default\\hold\\sikakuc.png", 0, 0, true, resourceManager, device);

            marks[1] = new PictureObject("img\\default\\hold\\batuc.png", 0, 0, true, resourceManager, device);

            marks[2] = new PictureObject("img\\default\\hold\\maruc.png", 0, 0, true, resourceManager, device);

            marks[3] = new PictureObject("img\\default\\hold\\sankakuc.png", 0, 0, true, resourceManager, device);

            marks[4] = new PictureObject("img\\default\\hold\\hidaric.png", 0, 0, true, resourceManager, device);

            marks[5] = new PictureObject("img\\default\\hold\\sitac.png", 0, 0, true, resourceManager, device);

            marks[6] = new PictureObject("img\\default\\hold\\migic.png", 0, 0, true, resourceManager, device);

            marks[7] = new PictureObject("img\\default\\hold\\uec.png", 0, 0, true, resourceManager, device);

            marks[8] = new PictureObject("img\\default\\hold\\Rc.png", 0, 0, true, resourceManager, device);

            marks[9] = new PictureObject("img\\default\\hold\\Lc.png", 0, 0, true, resourceManager, device);

            for (int i = 0; i < marks.Length; i++)
            {
                marks[i].Position = new Vector2(385 + 17 * i, 336);
                this.AddChild(marks[i]);
            }

            Hide();
        }
Exemple #12
0
        public override bool Load()
        {
            HomeScene = new HomeScene(device)
            {
                ResourceManager = this.ResourceManager,
                Sound           = this.Sound,
                SceneManager    = this.SceneManager,
                GameHost        = this.GameHost
            };
            HomeScene.LoadProgressed += HomeScene_LoadProgressed;

            outCircle = new PictureObject(device, ResourceManager, Utility.Path.Combine("logo", "outcircle.png"), true)
            {
                Position = new Vector2(400, 225)
            };
            bootImage = new PictureObject(device, ResourceManager, Utility.Path.Combine("logo", "boot_text.png"), true)
            {
                Position = new Vector2(400, 205)
            };
            completeImage = new PictureObject(device, ResourceManager, Utility.Path.Combine("logo", "complete_text.png"), true)
            {
                Position = new Vector2(400, 205),
                Alpha    = 0
            };
            provideImage = new PictureObject(device, ResourceManager, Utility.Path.Combine("logo", "provide_text.png"), false)
            {
                Position = new Vector2(-400, 185)
            };
            percentImage = new PictureObject(device, ResourceManager, Utility.Path.Combine("logo", "percent.png"), false)
            {
                Position = new Vector2(420, 235)
            };
            loadPercentImage = new NumberPictureObject(device, ResourceManager, Utility.Path.Combine("logo", "number.png"))
            {
                Position  = new Vector2(415, 235),
                Alignment = Alignment.Right,
                MaxDigit  = -1
            };
            rect = new RectangleComponent(device, ResourceManager, PPDColors.White);

            topBlack = new SpriteObject(device);
            topBlack.AddChild(new RectangleComponent(device, ResourceManager, PPDColors.Black)
            {
                RectangleHeight = 225,
                RectangleWidth  = 800
            });
            topBlack.AddChild(new RectangleComponent(device, ResourceManager, PPDColors.White)
            {
                Position        = new Vector2(0, 223),
                RectangleHeight = 4,
                RectangleWidth  = 800
            });

            bottomBlack = new SpriteObject(device)
            {
                Position = new Vector2(0, 225)
            };
            bottomBlack.AddChild(new RectangleComponent(device, ResourceManager, PPDColors.Black)
            {
                RectangleHeight = 225,
                RectangleWidth  = 800
            });
            bottomBlack.AddChild(new RectangleComponent(device, ResourceManager, PPDColors.White)
            {
                Position        = new Vector2(0, -2),
                RectangleHeight = 4,
                RectangleWidth  = 800
            });

            this.AddChild(circle = new Circle(device, ResourceManager));
            this.AddChild(outCircle);
            this.AddChild(loadPercentImage);
            this.AddChild(percentImage);
            this.AddChild(completeImage);
            this.AddChild(bootImage);
            this.AddChild(provideImage);
            this.AddChild(rect);
            this.AddChild(topBlack);
            this.AddChild(bottomBlack);

            var thread = ThreadManager.Instance.GetThread(() => { HomeScene.Load(); });

            thread.Start();

            return(true);
        }