Exemplo n.º 1
0
    void OnGUI()
    {
        if (Time.time % 2 < 1) {
            success = callBack.getResult ();
        }
        // For Setting Up ResponseBox.
        GUI.TextArea (new Rect (10, 5, 1300, 175), success);

        //======================================{{{{************}}}}================================
        if (GUI.Button (new Rect (50, 200, 200, 30), "SaveUserScore")) {
            App42Log.SetDebug (true);
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.SaveUserScore (cons.gameName, cons.userName, userScore, callBack);
        }

        //======================================{{{{************}}}}=================================
        if (GUI.Button (new Rect (260, 200, 200, 30), "GetScoresByUser")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetScoresByUser (cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (470, 200, 200, 30), "GetHighestScoreByUser")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetHighestScoreByUser (cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (680, 200, 200, 30), "GetLowestScoreByUser")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetLowestScoreByUser (cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (890, 200, 200, 30), "GetTopRankings")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetTopRankings (cons.gameName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (50, 250, 200, 30), "GetAverageScoreByUser")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetAverageScoreByUser (cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (260, 250, 200, 30), "GetLastScoreByUser")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetLastScoreByUser (cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (470, 250, 200, 30), "GetTopRankings")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetTopRankings (cons.gameName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (680, 250, 200, 30), "GetTopNRankings")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetTopNRankings (cons.gameName, max, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (890, 250, 200, 30), "GetTopNRankers")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            scoreBoardService.GetTopNRankers (cons.gameName, max, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (50, 300, 200, 30), "GetTopRankingsByGroup")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            IList<string> userList = new List<string> ();
            userList.Add (cons.userName);
            userList.Add (cons.userName1);
            scoreBoardService.GetTopRankingsByGroup (cons.gameName, userList, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (260, 300, 200, 30), "GetTopNRankersByGroup")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            IList<string> userList = new List<string> ();
            userList.Add (cons.userName);
            userList.Add (cons.userName1);
            scoreBoardService.GetTopNRankersByGroup (cons.gameName, userList, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button (new Rect (470, 300, 200, 30), "EditScoreValueById")) {
            scoreBoardService = sp.BuildScoreBoardService (); // Initializing ScoreBoard Service.
            IList<string> userList = new List<string> ();
            userList.Add (cons.userName);
            userList.Add (cons.userName1);
            scoreBoardService.EditScoreValueById (cons.scoreId, userScore, callBack);
        }
    }
Exemplo n.º 2
0
    void OnGUI()
    {
        if (Time.time % 2 < 1)
        {
            success = callBack.getResult();
        }
        // For Setting Up ResponseBox.
        GUI.TextArea(new Rect(10, 5, 1300, 175), success);

        //======================================{{{{************}}}}================================
        if (GUI.Button(new Rect(50, 200, 200, 30), "SaveUserScore"))
        {
            App42Log.SetDebug(true);
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.SaveUserScore(cons.gameName, cons.userName, userScore, callBack);
        }

        //======================================{{{{************}}}}=================================
        if (GUI.Button(new Rect(260, 200, 200, 30), "GetScoresByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetScoresByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(470, 200, 200, 30), "GetHighestScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetHighestScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(680, 200, 200, 30), "GetLowestScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetLowestScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(890, 200, 200, 30), "GetTopRankings"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopRankings(cons.gameName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(50, 250, 200, 30), "GetAverageScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetAverageScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(260, 250, 200, 30), "GetLastScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetLastScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(470, 250, 200, 30), "GetTopRankings"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopRankings(cons.gameName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(680, 250, 200, 30), "GetTopNRankings"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopNRankings(cons.gameName, max, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(890, 250, 200, 30), "GetTopNRankers"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopNRankers(cons.gameName, max, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(50, 300, 200, 30), "GetTopRankingsByGroup"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            IList <string> userList = new List <string> ();
            userList.Add(cons.userName);
            userList.Add(cons.userName1);
            scoreBoardService.GetTopRankingsByGroup(cons.gameName, userList, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(260, 300, 200, 30), "GetTopNRankersByGroup"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            IList <string> userList = new List <string> ();
            userList.Add(cons.userName);
            userList.Add(cons.userName1);
            scoreBoardService.GetTopNRankersByGroup(cons.gameName, userList, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(470, 300, 200, 30), "EditScoreValueById"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            IList <string> userList = new List <string> ();
            userList.Add(cons.userName);
            userList.Add(cons.userName1);
            scoreBoardService.EditScoreValueById(cons.scoreId, userScore, callBack);
        }
    }
    void OnGUI()
    {
        if (Time.time % 2 < 1)
        {
            success = callBack.getResult();
        }
        // For Setting Up ResponseBox.
        GUI.TextArea(new Rect(10, 5, 1300, 175), success);

        //======================================{{{{************}}}}================================
        if (GUI.Button(new Rect(470, 160, 200, 30), "CreateGame"))
        {
            App42Log.SetDebug(true);
            gameService = sp.BuildGameService();              // Initializing ScoreBoard Service.
            gameService.CreateGame(cons.gameName, cons.description, callBack);
        }

        //======================================{{{{************}}}}================================
        if (GUI.Button(new Rect(50, 200, 200, 30), "SaveUserScore"))
        {
            App42Log.SetDebug(true);
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.SaveUserScore(cons.gameName, cons.userName, userScore, callBack);
        }

        //======================================{{{{************}}}}=================================
        if (GUI.Button(new Rect(260, 200, 200, 30), "GetScoresByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetScoresByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(470, 200, 200, 30), "GetHighestScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetHighestScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(680, 200, 200, 30), "GetLowestScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetLowestScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(890, 200, 200, 30), "GetTopRankings"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopRankings(cons.gameName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(50, 250, 200, 30), "GetAverageScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetAverageScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(260, 250, 200, 30), "GetLastScoreByUser"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetLastScoreByUser(cons.gameName, cons.userName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(470, 250, 200, 30), "GetTopRankings"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopRankings(cons.gameName, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(680, 250, 200, 30), "GetTopNRankings"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopNRankings(cons.gameName, max, callBack);
        }

        //======================================{{{{************}}}}==========================================
        if (GUI.Button(new Rect(890, 250, 200, 30), "GetTopNRankers"))
        {
            scoreBoardService = sp.BuildScoreBoardService();              // Initializing ScoreBoard Service.
            scoreBoardService.GetTopNRankers(cons.gameName, max, callBack);
        }
    }
Exemplo n.º 4
0
 void RetrieveScores()
 {
     scoreBoardService = sp.BuildScoreBoardService(); // Initializing ScoreBoard Service.
     scoreBoardService.GetTopNRankings("CubeRunner", 10, callBack);
 }