예제 #1
0
        //InitialDefaultValue
        public override bool CanHitBy(RpAction action)
        {
            //isMatch
            bool left  = action == RpAction.Left_Press;
            bool right = action == RpAction.Right_Press;

            if (Coop == Coop.LeftOnly)
            {
                return(left);
            }
            if (Coop == Coop.RightOnly)
            {
                return(right);
            }

            return(left && right);
        }
예제 #2
0
        public override bool CanHitBy(RpAction action)
        {
            //isMatch
            bool left  = false;
            bool right = false;

            switch (Direction)
            {
            case Direction.Up:
                left  = action == RpAction.Left_Up;
                right = action == RpAction.Right_Up;
                break;

            case Direction.Down:
                left  = action == RpAction.Left_Down;
                right = action == RpAction.Right_Down;
                break;

            case Direction.Left:
                left  = action == RpAction.Left_Left;
                right = action == RpAction.Right_Left;
                break;

            case Direction.Right:
                left  = action == RpAction.Left_Right;
                right = action == RpAction.Right_Right;
                break;
            }

            if (Coop == Coop.LeftOnly)
            {
                return(left);
            }
            if (Coop == Coop.RightOnly)
            {
                return(right);
            }

            return(left && right);
        }
예제 #3
0
 //can be trigger by what key
 public abstract bool CanHitBy(RpAction action);
예제 #4
0
 //constructor
 public RpReplayFrame(double time, RpAction key, float posY, ReplayButtonState buttonState)
     : base(time, 0, posY, buttonState)
 {
     _listPressKeys.Clear();
     _listPressKeys.Add(key);
 }