Example #1
0
        private void Instance_KeyEvent(System.Windows.Forms.KeyEventArgs e, bool bDown)
        {
            if (!bDown)
                return;

            if (Enum.GetName(typeof(System.Windows.Forms.Keys), e.KeyCode) == (string)this._lbl.Tag)
            {
                Base interactor = Base.GetMostAccurateInteractor();
                if (interactor != this)
                    return;
            //				if (!(Main.Instance.LatestNoteOnInteractor == this || Main.Instance.LatestNoteOnInteractor == null))
            //					return;

                float acc = this.GetAccuracy();
                if (acc > 0)
                {
                    HitFeedback.Test points = new MusicGame.Midi.HitFeedback.Test();

                    if (acc > 0.9)
                        points.Points = 300;
                    else if (acc > 0.5)
                        points.Points = 100;
                    else
                        points.Points = 50;

                    points.Loc = this.Loc;
                    this.Dispose();
                }
            }
        }
Example #2
0
        private void Instance_KeyEvent(System.Windows.Forms.KeyEventArgs e, bool bDown)
        {
            if (!bDown)
            {
                return;
            }

            if (Enum.GetName(typeof(System.Windows.Forms.Keys), e.KeyCode) == (string)this._lbl.Tag)
            {
                Base interactor = Base.GetMostAccurateInteractor();
                if (interactor != this)
                {
                    return;
                }
//				if (!(Main.Instance.LatestNoteOnInteractor == this || Main.Instance.LatestNoteOnInteractor == null))
//					return;

                float acc = this.GetAccuracy();
                if (acc > 0)
                {
                    HitFeedback.Test points = new MusicGame.Midi.HitFeedback.Test();

                    if (acc > 0.9)
                    {
                        points.Points = 300;
                    }
                    else if (acc > 0.5)
                    {
                        points.Points = 100;
                    }
                    else
                    {
                        points.Points = 50;
                    }

                    points.Loc = this.Loc;
                    this.Dispose();
                }
            }
        }