Exemplo n.º 1
0
 void Awake()
 {
     RevSolidGameInfo.MaxPanelNum = 1;
     RevSolidGameInfo.InitializeHit();
     RevSolidUIControl.FindStartGamePanel();
     isRaycastHitOn = true;
 }
Exemplo n.º 2
0
 public static void IndicatePitfalls()
 {
     if (isPitfallWarningDone == false)
     {
         //Time.timeScale = 0;
         RevSolidUIControl.SetTutorialMessage("Watch out. Once a solid enter the ring in the middle, you will lose your point.");
         //RevSolidUIControl.ShowResponseButton ();
         isPitfallWarningDone = true;
     }
 }
Exemplo n.º 3
0
 public static void IndicateKeyUsage()
 {
     if (RevSolidGameInfo.MaxPanelNum == 1)
     {
         RevSolidUIControl.SetTutorialMessage("[Hover cursor on solid once & use WASD] - rotate solid | [SPACE] - freeze rotation");
     }
     else          //4
     {
         RevSolidUIControl.SetTutorialMessage("[Hover cursor on solid once & use WASD] - rotate solid");
     }
 }
Exemplo n.º 4
0
 public void RespondToReactionTime()
 {
     if (reactionTime >= RevSolidGameInfo.MaxReactionTime)
     {
         isKilled = true;
         RevSolidGameInfo.Add2FalseStrokeCount(1);
         RevSolidUIControl.RefreshBroadcasts();
     }
     else if (reactionTime >= 3.0f)
     {
         Tutorial.IndicateKeyUsage();
     }
 }
Exemplo n.º 5
0
 bool InCentralArea(int objIndex)
 {
     if (Distance2Center(objIndex) < forbiddenRadius)
     {
         RevSolidGameInfo.Add2FalseStrokeCount(1);
         RevSolidUIControl.RefreshBroadcasts();
         return(true);
     }
     else if (Distance2Center(objIndex) < PitfallWarningRadius)
     {
         Tutorial.IndicatePitfalls();
         return(false);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 6
0
    public static void CheckEndOfGame()
    {
        if (hit >= WinningCriterion)
        {
            DataUtil.UnlockCurrentRoom();
            RevSolidUIControl.defaultString = "You have unlocked this room! Press Q to quit.";
        }

        if (hit < WinningCriterion)
        {
            RevSolidUIControl.defaultString = "";
            if (falseStrokeCount >= MaxFalseCount)
            {
                Time.timeScale = 0;
                RevSolidUIControl.ShowRetry();
            }
        }

        if (Input.GetKeyDown(KeyCode.Q))
        {
            EventManager.TriggerEvent("Qdown");
        }
    }
Exemplo n.º 7
0
    void DisplayScore(int bestMatchCand)
    {
        switch (bestMatchCand)
        {
        case -1:
            RevSolidUIControl.BroadcastMsg("fantastic!");
            break;

        case 0:
            RevSolidUIControl.BroadcastMsg("left edge is not the correct axis");
            break;

        case 1:
            RevSolidUIControl.BroadcastMsg("right edge is not the correct axis");
            break;

        case 2:
            RevSolidUIControl.BroadcastMsg("bottom edge is not the correct axis");
            break;

        case 3:
            RevSolidUIControl.BroadcastMsg("top edge is not the correct axis");
            break;

        case 4:
            RevSolidUIControl.BroadcastMsg("diagonal / is not the correct axis");
            break;

        case 5:
            RevSolidUIControl.BroadcastMsg("diagonal \\ is not the correct axis");
            break;

        default:
            RevSolidUIControl.BroadcastMsg("try again!");
            break;
        }
    }
Exemplo n.º 8
0
    public int Grading(List <Vector3> path)
    {
        //calculate start/end vertices & slope

        Vector3 start = path[0];
        Vector3 end   = path[path.Count - 1];
        Vector3 mid   = path [path.Count / 2];

        if (Vector3.Distance(start, end) < 50)
        {
            return(-2);
        }

        //sectionIndex
        int panelIndex = IdentifyPanelIndexOfStroke(mid);
        //Debug.Log (panelIndex);
        int bestMatchCandNo = -2;

        if (ActiveObjControl.activeObjects [panelIndex].isKilled == false)
        {
            bestMatchCandNo = BestMatchCandidate(path, panelIndex);
            if (bestMatchCandNo == -1)
            {
                RevSolidGameInfo.Add2TotalHit(1);
                RevSolidUIControl.BroadcastHits();

                DisableFormerQuestion(panelIndex);
                this.GetComponent <RevSolidUIControl>().ShowCheckMark(panelIndex);
            }
            else
            {
                RevSolidGameInfo.Add2FalseStrokeCount(1);
                RevSolidUIControl.BroadcastFalseStrokeCount();
                Tutorial.IndicateCorrectAns(panelIndex);
            }
        }

        string bmcName;

        switch (bestMatchCandNo)
        {
        case -1:
            bmcName = "correct";
            break;

        case 0:
            bmcName = "left edge";
            break;

        case 1:
            bmcName = "right edge";
            break;

        case 2:
            bmcName = "bottom edge";
            break;

        case 3:
            bmcName = "top edge";
            break;

        case 4:
            bmcName = "diagonal /";
            break;

        case 5:
            bmcName = "diagonal \\";
            break;

        default:
            bmcName = "no match";
            break;
        }

        GetGradingResult(ActiveObjControl.activeObjects[panelIndex].polygonIndex, panelIndex, bmcName);
        EventManager.TriggerEvent("Grading");
        return(bestMatchCandNo);
    }
Exemplo n.º 9
0
 void Awake()
 {
     RevSolidGameInfo.MaxPanelNum = 4;
     RevSolidGameInfo.InitializeHit();
     RevSolidUIControl.FindStartGamePanel();
 }
Exemplo n.º 10
0
 static void DisplayInitialInstructions()
 {
     Time.timeScale = 0;
     RevSolidUIControl.EnableInitialInstructionPanel();
 }