Exemple #1
0
        public void update(FrameEventArgs e)
        {
            if (enabled)
            {
                b.OnUpdateFrame(e);
                b2.OnUpdateFrame(e);
            }
            if (avatar == null && done)
            {
                avatar = new Rect(new Rectangle(back.Bounds.X + 2, back.Bounds.Y+2, 100, 100), Path.GetTempPath() + u.Name + "av.jpg", false, false);
                avatar.Alpha = 0;
                avatar.fade(1, .3);
                u.avatarRect = avatar;
                done = false;
            }
            if (Utils.contains(back.ModifiedBounds) && Game.MouseState.LeftButton && canpress)
            {
                enabled = !enabled;
                if (enabled)
                {
                    playCount.Alpha = 0;
                }
                else
                {
                    playCount.Alpha = 1;
                }
                canpress = false;
                Game.lClickFrame = true;
            }
            else
            {
                if (!Game.MouseState.LeftButton)
                {
                    canpress = true;
                }
            }
            if (Utils.contains(back.ModifiedBounds) && !set)
            {
                playCount.Line = "Accuracy: " + u.Accuracy.ToString("N2")+"%";//("Song: " + u.CurrentSong + "\n" + u.CurrentChart);
                set = true;
                set1 = true;
            } else {
                if (set1 && !Utils.contains(back.ModifiedBounds))
                {
                    playCount.Line = ("PC: " + u.Playcount + "\nScore: " + u.TotalScore + "\nLevel: " + u.Level);
                    set1 = false;
                    set = false;
                }

            }
        }
Exemple #2
0
 private void burstAcc(int acc)
 {
     Rect tempTexture;
     tempTexture = new Rect(new Rectangle(frame.Location.X + (int)(frame.Width / 2) - 15, (int)frame.HitHeight - 250, 30, 10), accsID[acc]);
     tempTexture.Colour = Skin.AccColours[acc];
     tempTexture.Lifespan = 0.20;
     tempTexture.Alpha = 0.0f;
     tempTexture.fade(1.0f, 0.07);
     tempTexture.scale(new Size((int)frame.Width - 20, 100), 0.07);
     tempTexture.move(new Point(frame.Location.X + 10, (int)frame.HitHeight - 300), 0.07);
     accBurst = tempTexture;
 }