Пример #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
        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
 public override bool OnReleased(TaikoAction action)
 {
     if (action == firstHitAction)
     {
         firstKeyHeld = false;
     }
     return(base.OnReleased(action));
 }
Пример #5
0
 public override void OnReleased(TaikoAction action)
 {
     if (action == HitAction)
     {
         HitAction = null;
     }
     base.OnReleased(action);
 }
Пример #6
0
 public override bool OnReleased(TaikoAction action)
 {
     if (action == HitAction)
     {
         HitAction = null;
     }
     return(base.OnReleased(action));
 }
Пример #7
0
        public override bool OnPressed(TaikoAction action)
        {
            if (Judgement.Result != HitResult.None)
            {
                return(false);
            }

            validKeyPressed = HitActions.Contains(action);

            return(UpdateJudgement(true));
        }
Пример #8
0
        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
        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
            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);
 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
 public override bool OnPressed(TaikoAction action)
 {
     return(Judgement.Result == HitResult.None && UpdateJudgement(true));
 }
Пример #18
0
 public override bool OnPressed(TaikoAction action) => UpdateJudgement(true);
Пример #19
0
 public override bool OnPressed(TaikoAction action) => false;
Пример #20
0
 public override bool OnPressed(TaikoAction action) => UpdateResult(true);