コード例 #1
0
        public override bool OnPressed(TaikoAction action)
        {
            validKeyPressed = HitActions.Contains(action);

            // Only count this as handled if the new judgement is a hit
            return(UpdateJudgement(true));
        }
コード例 #2
0
        public override bool OnPressed(TaikoAction action)
        {
            if (Judgement.Result != HitResult.None)
            {
                return(false);
            }

            // Don't handle keys before the swell starts
            if (Time.Current < HitObject.StartTime)
            {
                return(false);
            }

            // Find the keyset which this key corresponds to
            var keySet = rimActions.Contains(action) ? rimActions : centreActions;

            // Ensure alternating keysets
            if (keySet == lastAction)
            {
                return(false);
            }
            lastAction = keySet;

            UpdateJudgement(true);

            return(true);
        }
コード例 #3
0
ファイル: DrawableHit.cs プロジェクト: Takakura-Anri/osu
        public override bool OnPressed(TaikoAction action)
        {
            if (pressHandledThisFrame)
            {
                return(true);
            }

            if (Judged)
            {
                return(false);
            }

            validActionPressed = HitActions.Contains(action);

            // Only count this as handled if the new judgement is a hit
            var result = UpdateResult(true);

            if (IsHit)
            {
                HitAction = action;
            }

            // Regardless of whether we've hit or not, any secondary key presses in the same frame should be discarded
            // E.g. hitting a non-strong centre as a strong should not fall through and perform a hit on the next note
            pressHandledThisFrame = true;

            return(result);
        }
コード例 #4
0
ファイル: DrawableHitStrong.cs プロジェクト: rootyElf/osu
 public override bool OnReleased(TaikoAction action)
 {
     if (action == firstHitAction)
     {
         firstKeyHeld = false;
     }
     return(base.OnReleased(action));
 }
コード例 #5
0
ファイル: DrawableHit.cs プロジェクト: xphlawlessx/osu
 public override void OnReleased(TaikoAction action)
 {
     if (action == HitAction)
     {
         HitAction = null;
     }
     base.OnReleased(action);
 }
コード例 #6
0
ファイル: DrawableHit.cs プロジェクト: Takakura-Anri/osu
 public override bool OnReleased(TaikoAction action)
 {
     if (action == HitAction)
     {
         HitAction = null;
     }
     return(base.OnReleased(action));
 }
コード例 #7
0
ファイル: DrawableHit.cs プロジェクト: tgi74/osu
        public override bool OnPressed(TaikoAction action)
        {
            if (Judgement.Result != HitResult.None)
            {
                return(false);
            }

            validKeyPressed = HitActions.Contains(action);

            return(UpdateJudgement(true));
        }
コード例 #8
0
ファイル: DrawableHit.cs プロジェクト: vbe0201/osu
        public override bool OnPressed(TaikoAction action)
        {
            if (Judged)
            {
                return(false);
            }

            validActionPressed = HitActions.Contains(action);

            // Only count this as handled if the new judgement is a hit
            var result = UpdateResult(true);

            if (IsHit)
            {
                HitAction = action;
            }

            return(result);
        }
コード例 #9
0
ファイル: DrawableSwell.cs プロジェクト: tom-arrow/osu
        public override bool OnPressed(TaikoAction action)
        {
            // Don't handle keys before the swell starts
            if (Time.Current < HitObject.StartTime)
            {
                return(false);
            }

            var isCentre = action == TaikoAction.LeftCentre || action == TaikoAction.RightCentre;

            // Ensure alternating centre and rim hits
            if (lastWasCentre == isCentre)
            {
                return(false);
            }
            lastWasCentre = isCentre;

            UpdateJudgement(true);

            return(true);
        }
コード例 #10
0
        public override bool OnPressed(TaikoAction action)
        {
            // Check if we've handled the first key
            if (Judgement.Result == HitResult.None)
            {
                // First key hasn't been handled yet, attempt to handle it
                bool handled = base.OnPressed(action);

                if (handled)
                {
                    firstHitTime   = Time.Current;
                    firstHitAction = action;
                    firstKeyHeld   = true;
                }

                return(handled);
            }

            // If we've already hit the second key, don't handle this object any further
            if (Judgement.SecondHit)
            {
                return(false);
            }

            // Don't handle represses of the first key
            if (firstHitAction == action)
            {
                return(false);
            }

            // Don't handle invalid hit action presses
            if (!HitActions.Contains(action))
            {
                return(false);
            }

            // Assume the intention was to hit the strong hit with both keys only if the first key is still being held down
            return(firstKeyHeld && UpdateJudgement(true));
        }
コード例 #11
0
ファイル: DrawableHit.cs プロジェクト: Takakura-Anri/osu
            public override bool OnPressed(TaikoAction action)
            {
                // Don't process actions until the main hitobject is hit
                if (!MainObject.IsHit)
                {
                    return(false);
                }

                // Don't process actions if the pressed button was released
                if (MainObject.HitAction == null)
                {
                    return(false);
                }

                // Don't handle invalid hit action presses
                if (!MainObject.HitActions.Contains(action))
                {
                    return(false);
                }

                return(UpdateResult(true));
            }
コード例 #12
0
 public virtual void OnReleased(TaikoAction action)
 {
 }
コード例 #13
0
        public override bool OnPressed(TaikoAction action)
        {
            validKeyPressed = HitActions.Contains(action);

            return(UpdateJudgement(true));
        }
コード例 #14
0
 public abstract bool OnPressed(TaikoAction action);
コード例 #15
0
 public override bool OnPressed(TaikoAction action)
 {
     JudgementType = action == TaikoAction.LeftRim || action == TaikoAction.RightRim ? HitType.Rim : HitType.Centre;
     return(UpdateResult(true));
 }
コード例 #16
0
 public virtual bool OnReleased(TaikoAction action) => false;
コード例 #17
0
ファイル: DrawableDrumRollTick.cs プロジェクト: tgi74/osu
 public override bool OnPressed(TaikoAction action)
 {
     return(Judgement.Result == HitResult.None && UpdateJudgement(true));
 }
コード例 #18
0
ファイル: DrawableDrumRollTick.cs プロジェクト: Aikoyori/osu
 public override bool OnPressed(TaikoAction action) => UpdateJudgement(true);
コード例 #19
0
 public override bool OnPressed(TaikoAction action) => false;
コード例 #20
0
ファイル: DrawableDrumRollTick.cs プロジェクト: Tiller431/yes
 public override bool OnPressed(TaikoAction action) => UpdateResult(true);