コード例 #1
0
ファイル: GameApi.cs プロジェクト: paulhare93/G2_GraWKolory
    private string GetTherapySession()
    {
        if (currentGameSessionParams == null)
        {
            currentGameSessionParams = new GameSessionParams();
        }

        if (String.IsNullOrEmpty(currentGameSessionParams.therapySession))
        {
            currentGameSessionParams.therapySession = therapySession;
        }
        return currentGameSessionParams.therapySession;
    }
コード例 #2
0
ファイル: GameApi.cs プロジェクト: paulhare93/G2_GraWKolory
    void OnAjaxCallback(string json, string functionName)
    {
        Debug.Log(json);
        isOnline = true;

        if (currentGameSessionParams == null || functionName == "load")
        {
            GameSessionParams gameSessionParams = JsonConvert.DeserializeObject<GameSessionParams>(json);
            currentGameSessionParams = gameSessionParams;

            if (!String.IsNullOrEmpty(therapySession))
            {
                currentGameSessionParams.therapySession = therapySession;
            }
            else
            {
                currentGameSessionParams.therapySession = "temporary";
            }
        }
    }