protected override void parseJsonReceived (JSONNode __jsonNodeReceived)
		{
			_jsonNode = __jsonNodeReceived["entity"];
			
			JSONNode rankingListNode = _jsonNode["minigameRankingList"];
			if(string.IsNullOrEmpty(rankingListNode.ToString()) == false)
			{
				_minigameRankingList = convertJsonArrayToSVOList<MinigameRankingSVO>(rankingListNode.AsArray);
			}
			
			
			
			JSONNode userRankingNode = _jsonNode["userMinigameRanking"];
			if(string.IsNullOrEmpty(userRankingNode.ToString()) == false)
			{
				_userMinigameRanking = new MinigameRankingSVO();
				_userMinigameRanking.setup(userRankingNode);
			}
			
			
			
			JSONNode hasNextPageNode = _jsonNode["hasNextPage"];
			if(string.IsNullOrEmpty(hasNextPageNode.ToString()) == false)
			{
				_hasNextPage = hasNextPageNode.AsBool;
			}
			else
			{
				_hasNextPage = false;
			}
		}
		protected override void parseJsonReceived (JSONNode __jsonNodeReceived)
		{
			_ranking    = _jsonNode["ranking"].AsInt;
			_score     	= _jsonNode["points"].AsFloat;
			_timeSpent  = _jsonNode["timeSpent"].AsFloat;
			_stage      = _jsonNode["stage"].AsInt;
			_stars		= _jsonNode["stars"].AsInt;
		}
		protected override void parseJsonReceived (JSONNode __jsonNodeReceived)
		{
			_jsonNode = __jsonNodeReceived["entityList"];
			
			JSONNode scoresListNode = _jsonNode;
			if(string.IsNullOrEmpty(scoresListNode.ToString()) == false) {
				_playerScoresList = convertJsonArrayToSVOList<PlayerScoreSVO>(scoresListNode.AsArray);
			}
		}
		protected override void parseJsonReceived (JSONNode __jsonNodeReceived)
		{
			_idUser     	= _jsonNode["idUser"].AsInt;
			_idMinigame 	= _jsonNode["idMinigame"].AsInt;
			_nickName   	= _jsonNode["nickName"];
			_firstName  	= _jsonNode["firstName"];
			_lastName   	= _jsonNode["lastName"];
			_grade      	= _jsonNode["grade"].AsInt;
			_backendUrl 	= _jsonNode["backendUrl"];
			_minigameFolder = _jsonNode["minigameFolder"];
			_externalResourcesPath 	= (_minigameFolder + "resources/");
			//removendo duas barras inexplicaveis antes do resources
			_externalResourcesPath = _externalResourcesPath.Replace("//resources/", "/resources/");
		}
Beispiel #5
0
 public override JSONNode Remove(JSONNode aNode)
 {
     try
     {
         var item = m_Dict.Where(k => k.Value == aNode).First();
         m_Dict.Remove(item.Key);
         return aNode;
     }
     catch
     {
         return null;
     }
 }
Beispiel #6
0
 public override void Add (string aKey, JSONNode aItem)
 {
     var tmp = new JSONClass();
     tmp.Add(aKey, aItem);
     Set(tmp);
 }
Beispiel #7
0
 public override void Add (JSONNode aItem)
 {
     var tmp = new JSONArray();
     tmp.Add(aItem);
     Set(tmp);
 }
Beispiel #8
0
 private void Set(JSONNode aVal)
 {
     if (m_Key == null)
     {
         m_Node.Add(aVal);
     }
     else
     {
         m_Node.Add(m_Key, aVal);
     }
     m_Node = null; // Be GC friendly.
 }
Beispiel #9
0
 public JSONLazyCreator(JSONNode aNode, string aKey)
 {
     m_Node = aNode;
     m_Key = aKey;
 }
Beispiel #10
0
 public JSONLazyCreator(JSONNode aNode)
 {
     m_Node = aNode;
     m_Key  = null;
 }
Beispiel #11
0
 public virtual JSONNode Remove(JSONNode aNode) { return aNode; }
		protected override void parseJsonReceived (JSONNode __jsonNodeReceived)
		{
			_idUser     = _jsonNode["idUser"].AsInt;
			_idMinigame = _jsonNode["idMinigame"].AsInt;
			_nickName   = _jsonNode["nikName"]; //nome no json recebido errado 
			_login      = _jsonNode["login"];
			_firstName  = _jsonNode["firstName"];
			_lastName   = _jsonNode["lastName"];
			_grade      = _jsonNode["grade"].AsInt;
			_ranking    = _jsonNode["ranking"].AsInt;
			_score     	= _jsonNode["points"].AsInt; //nome no json recebido errado 
			_timeSpent  = _jsonNode["timeSpent"].AsInt;
			_stage      = _jsonNode["stage"].AsInt;
			_program    = _jsonNode["program"].AsInt;
		}
Beispiel #13
0
 public override void Add(string aKey, JSONNode aItem)
 {
     if (!string.IsNullOrEmpty(aKey))
     {
         if (m_Dict.ContainsKey(aKey))
             m_Dict[aKey] = aItem;
         else
             m_Dict.Add(aKey, aItem);
     }
     else
         m_Dict.Add(Guid.NewGuid().ToString(), aItem);
 }
Beispiel #14
0
 public virtual void Add(JSONNode aItem)
 {
     Add("", aItem);
 }
Beispiel #15
0
 public virtual void Add(string aKey, JSONNode aItem){ }
Beispiel #16
0
 public override JSONNode Remove(JSONNode aNode)
 {
     m_List.Remove(aNode);
     return aNode;
 }
Beispiel #17
0
 public override void Add(string aKey, JSONNode aItem)
 {
     m_List.Add(aItem);
 }
		protected override void parseJsonReceived (JSONNode __jsonNodeReceived)
		{
		}