예제 #1
0
        public void AddDanceMove(char gender, TimeSpan moveSpan, string moveIcon)
        {
            DanceMove newMove = new DanceMove(moveSpan, moveIcon);
            if (moveIcon == "block")
            {
                newMove.moveGender = "neutral";

                if (gender == 'm')
                    m_scoreBlock.Add(newMove);
                else if (gender == 'f')
                    f_scoreBlock.Add(newMove);
            }
            else
            {
                if (gender == 'm')
                    m_danceMoves.Add(newMove);
                else if (gender == 'f')
                {
                    newMove.moveGender = "female";
                    f_danceMoves.Add(newMove);
                }
            }
        }
예제 #2
0
 public bool ScoreMove(DanceMove move, TimeSpan currentTime)
 {
     return true;
     //double diff = Math.Abs((currentTime.Subtract(move.moveSpan).TotalMilliseconds));
     //return (GLOBALS.SCORING_WINDOW - diff) > 0;
 }
예제 #3
0
        public bool CheckMove(DanceMove move, TimeSpan currentTime)
        {
            //return -1 if move not triggered
            //otherwise, return the score for that move

            //TODO: call this somewhere else
            bool score = false;
            switch (move.GetName())
            {
                //TODO: There MUST be a better way of doing this than a huge switch statement
                #region "m/f left knee moves"
                case "LeftKneeLift":
                    if (LeftKneeTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftAndFrontTorsoAndLeftHand":
                    if (LeftKneeLiftAndFrontTorsoAndLeftHandTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftAndLeftHand":
                    if (LeftKneeLiftAndLeftHandTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftAndFrontTorso":
                    if (LeftKneeLiftAndFrontTorsoTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftAndCross":
                    if (LeftKneeLiftAndCrossTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftFaceLeft":
                    if (LeftKneeLiftFaceLeftTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftFaceRight":
                    if (LeftKneeLiftFaceRightTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftFaceBack":
                    if (LeftKneeLiftFaceBackTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeLiftAndUnderArm":
                    if (LeftKneeLiftAndUnderArmTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeKick":
                    if (LeftKneeKickTriggered()) score = ScoreMove(move, currentTime);
                    break;
                #endregion
                #region "m/f right knee moves"
                case "RightKneeLift":
                    if (RightKneeTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeLiftAndCross":
                    if (RightKneeLiftAndCrossTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeLiftAndLeftHand":
                    if (RightKneeLiftAndLeftHandTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeLiftAndBackTorso": //this might not be real
                    if (RightKneeLiftAndBackTorsoTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeLiftAndBackTorsoAndLeftHand": //this might not be real either
                    if (RightKneeLiftAndBackTorsoAndLeftHandTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeKick":
                    if (RightKneeKickTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeKickUnderArm":
                    if (RightKneeKickAndUnderArmTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeLiftFaceLeft":
                    if (RightKneeLiftFaceLeftTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "BackSpinRightKneeLift":
                case "RightKneeLiftFaceBack":
                    if (RightKneeLiftFaceBackwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                #endregion
                #region "male special moves for Dance1"
                case "KneelAndClap":
                    if (KneelingTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeKneelAndUnderArm":
                    if (RightKneeKneelAndUnderArmTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightKneeKneelAndUnderArmAndLeftHandBehind":
                    if (RightKneeKneelAndUnderArmAndLeftHandBehindTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "WaiterHand":
                    if (MoveToRightAndWaiterHandTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "ShrugShoulders":
                    if (ShrugShouldersTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightFootSwing":
                    if (RightFootSwingTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightFootCross":
                    if (RightFootCrossTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftKneeBendCrouch":
                case "LeftKneeBendCrouchLeft":
                case "LeftKneeBendCrouchRight":
                    if (LeftKneeBendCrouchTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftHandToFaceSpinForward":
                    if (LeftHandToFaceSpinForwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftHandToFaceSpinBackward":
                    if (LeftHandToFaceSpinBackwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                #endregion
                #region "f moves dance 1"
                case "HandSwingFront":
                    if (RightHandToFaceSpinForwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "HandSwingBack":
                    if (RightHandToFaceSpinBackwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "HandSwingRight":
                    if (RightHandToFaceSpinForwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "HandSwingLeft":
                    if (RightHandToFaceSpinBackwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "HipShakeBack":
                    if (HipShakeFaceBackwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "HipShakeFront":
                    if (HipShakeFaceForwardTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "CrouchAndHipShake":
                    if (CrouchAndHipShakeTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "ElbowSway":
                case "RightElbowSway":
                    if (ElbowSwayRightTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftElbowSway":
                    if (ElbowSwayLeftTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "ScrollingHandsRight":
                    if (ScrollingHandsRightTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "ScrollingHandsLeft":
                    if (ScrollingHandsRightTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftHandRaise":
                case "LeftWristArcRaise":
                    if (LeftHandRaiseTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "RightHandRaise":
                case "RightWristArcRaise":
                    if (RightHandRaiseTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "Home":
                    if (HandsOnHipsTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "ThrillerHandsLeft":
                    if (ThrillerHandsLeftTriggered()) score = ScoreMove(move, currentTime);
                    break;
                case "LeftBendHipShake":
                    if (LeftBendHipShakeTriggered()) score = ScoreMove(move, currentTime);
                    break;
                #endregion
                default:
                    //GLOBALS.writer.WriteLine(move.GetName() + " unknown");
                    move.ScoreMove(currentTime);
                    break;
            }

            return score;
        }