コード例 #1
0
        public void create(DungeonUserModel dungeonUserModel, CallBackCreate callback)
        {
            this.createCallback = callback;
            WWWForm form = new WWWForm();

            form.AddField("dungeon_id", dungeonUserModel.dungeon_id);
            form.AddField("user_id", Token.GetUserId());
            form.AddField("session", Token.GetToken());
            httpHandlerScript.POST(Config.apiUrl + "dungeonsUsers/store", CallBackCreateDungeonUser, form);
        }
コード例 #2
0
        void CallBackUpdate(string response)
        {
            if (response == "")
            {
                return;
            }
            DungeonUserModel dungeonUserModel = JsonUtility.FromJson <DungeonUserModel>(response);

            print(dungeonUserModel);
        }
コード例 #3
0
        void CallBackGetActiveDungeonByUserId(string response)
        {
            if (response == "")
            {
                return;
            }
            DungeonUserModel dungeonUserModel = JsonUtility.FromJson <DungeonUserModel>(response);

            print(dungeonUserModel);
            getActiveCallback(dungeonUserModel, "");
        }
コード例 #4
0
 void CallBackCreateDungeonUser(string response)
 {
     /* Error Enum Pending */
     if (response == "invalid_session" || response == "invalid_dungeon" || response == "invalid_user_profile" || response == "insufficient_level" || response == "already_in_dungeon")
     {
         createCallback(new DungeonUserModel(), response);
     }
     else
     {
         DungeonUserModel dungeonUserModel = JsonUtility.FromJson <DungeonUserModel>(response);
         print(dungeonUserModel);
         createCallback(dungeonUserModel, "");
     }
 }