Example #1
0
 private void LogStudentActionsResponse(EnlearnCall inCall, JSONNode inData)
 {
     if (OnLogActions != null)
     {
         OnLogActions(inData);
     }
 }
Example #2
0
    private void QueueCall(CallType inCall, JSONNode inData, bool inbRequired, float inDelay = 0.0f)
    {
        EnlearnCall call = new EnlearnCall(inCall, inData, inbRequired);

        call.Delay = inDelay;
        m_Calls.Enqueue(call);
    }
Example #3
0
    private void GetNextProblemResponse(EnlearnCall inCall, JSONNode inData)
    {
        Level level = new Level();

        Logger.Log("Received level JSON:\n{0}", inData.ToFormattedString());
        level.ParseJSON(inData, true);

        m_NextLevel = level;
    }
Example #4
0
    private void UpdateCallQueue()
    {
        if (m_Calls.Count == 0)
        {
            return;
        }

        EnlearnCall nextCall = m_Calls.Peek();

        if (nextCall.Delay > 0)
        {
            nextCall.Delay -= Time.deltaTime;
        }
        else if (nextCall.State == CallState.Queued)
        {
            nextCall.Invoke();
        }
        else if (nextCall.State == CallState.Finished)
        {
            nextCall.Dispose();
            m_Calls.Dequeue();
        }
    }
Example #5
0
 private void UpdateStudentInfoResponse(EnlearnCall inCall)
 {
 }
Example #6
0
 private void UpdateStudentInfoImpl(EnlearnCall inCall)
 {
     m_Client.UpdateStudentInfo(m_StudentID, inCall.Data.ToString());
     this.WaitSecondsThen(1.0f, inCall.OnResponse, string.Empty);
 }
Example #7
0
 private void LogStudentActionsImpl(EnlearnCall inCall)
 {
     Logger.Log("Sending LogStudentActions: {0}", inCall.Data.ToFormattedString());
     m_Client.LogStudentActions(m_StudentID, inCall.Data.ToString(), inCall.OnResponse);
 }
Example #8
0
 private void GetNextProblemImpl(EnlearnCall inCall)
 {
     m_Client.GetNextProblem(m_StudentID, inCall.OnResponse);
 }