Пример #1
0
    public void AddStudentGameNewScores(string GameOwneruserid, string userid, string UniqueQuestionId, StudentScores studentscore)
    {
        Debug.Log("Add student's game user score into database");
        Debug.Log("Call Score manager to add data");
        crudscore.AddStudentGameNewScores(GameOwneruserid, userid, UniqueQuestionId, studentscore);

        crudscore.getUserScoreForStudentGame(GameOwneruserid, userid, UniqueQuestionId, printSuccessMsg);
    }
    string ownerID = StaticVariable.ownerID; //"userid1159";


    // Start is called before the first frame update
    IEnumerator Start()
    {
        shareButton.SetActive(false);
        character = StaticVariable.characterSelect;
        setCharacterMovement(character, false);
        Time.timeScale = 0;
        crudscore      = GetComponent <CRUDScores>();
        crudquestion   = GetComponent <CRUDquestion>();
        crudscore.getUserScoreForStudentGame(ownerID, userID, gameID, callbackFunc);
        yield return(new WaitUntil(() => call == true));

        // Set this before calling into the realtime database.
        // FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://ssadpancake.firebaseio.com/");
        FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://ssad-c9270.firebaseio.com/");
        // Get the root reference location of the database.
        mDatabaseRef = FirebaseDatabase.DefaultInstance.RootReference;
        Score.text   = "0";
        // point = GetComponent<AudioSource>();

        coroutine = GenerateQuestions();
        StartCoroutine(coroutine);
    }
Пример #3
0
 public void Test_getUserScoreForStudentGame_WithValidValue(string GameOwneruserid, string userid, string UniqueQuestionId)
 {
     crudscore.getUserScoreForStudentGame(GameOwneruserid, userid, UniqueQuestionId, CallBackFunction_WithTrue);
 }
 public void Preformancetest_getUserScoreForStudentGame(string GameOwneruserid, string userid, string UniqueQuestionId)
 {
     Debug.Log("Calling getUserScoreForStudentGame at: " + System.DateTime.Now);
     crudscore.getUserScoreForStudentGame(GameOwneruserid, userid, UniqueQuestionId, printggetUserScoreForStudentGameTime);
 }