Esempio n. 1
0
 void Update()
 {
     if (Input.GetKeyDown(rankingDebugKey))
     {
         var markers = MarkerManager.GetMarkerObjects();
         if (markers.Count == 0)
         {
             return;
         }
         Ranking.Post(1000, markers[0]);
     }
 }
Esempio n. 2
0
    IEnumerator FinishGameSequence()
    {
        GlobalGUI.SetText("Finish!");
        yield return(new WaitForSeconds(3f));

        GlobalGUI.SetText("Your Score is...");
        yield return(new WaitForSeconds(2f));

        GlobalGUI.SetText(Score.Get().ToString());
        yield return(new WaitForSeconds(5f));

        var markers = MarkerManager.GetMarkerObjects();

        if (markers.Count == 0)
        {
            while (markers.Count == 0)
            {
                GlobalGUI.SetText("Please Put LITTAI button!");
                yield return(new WaitForSeconds(1f));

                markers = MarkerManager.GetMarkerObjects();
            }
        }
        yield return(new WaitForSeconds(1f));

        try {
            bool isHit = false;
            foreach (var marker in markers)
            {
                if (marker)
                {
                    Ranking.Post(Score.Get(), markers[0].gameObject);
                    isHit = true;
                    break;
                }
            }
            Debug.LogError("No Marker...");
        } catch (System.Exception e) {
            Debug.LogError(e.Message);
        }

        GlobalGUI.SetText("Thank you for playing!");
        GlobalGUI.ShowBgmRefer(true);
        yield return(new WaitForSeconds(6f));

        Restart();
    }