Example #1
0
    public override void Load(params object[] input)
    {
        JSONTable_Friends  friends = SyncData.FriendTable;
        JSONTable_UserInfo users   = SyncData.UserInfos;

        UserInfoRow user = null;

        for (int i = 0; i < friends.Count; i++)
        {
            FriendRow friendInfo = friends.ReadOnlyRows[i];

            if (IsAlreadyFriend(friendInfo))
            {
                user = users.GetUserById(friendInfo.ID_Player);

                FriendTag tag = GetFriendTag(friendInfo);

                tag.UserName.text = user.NameInGame;

                tag.RemoveButton.OnClickEvents += delegate
                {
                    OnUnfriendButton(friendInfo);
                    ReleaseTag(tag);
                };

                tag.gameObject.SetActive(true);
            }
        }
    }
Example #2
0
    private IEnumerator StartCreateAgents()
    {
        AJPHelper.Operation oper = UnitTable.Operation;
        while (!oper.IsDone)
        {
            yield return(null);
        }

        int i     = 0;
        int count = UnitTable.Count;

        UnitRow     unitData = null;
        UserInfoRow user     = null;

        while (i < count)
        {
            unitData = UnitTable.ReadOnlyRows[i];
            user     = Users.GetUserById(unitData.ID_User);
            Create(unitData, user);

            i++;
            yield return(null);
        }
        yield break;
    }
Example #3
0
        public void LoadUserInfo(JSONObject serMsg)
        {
            serMsg[0].GetField(ref User_ID, "ID_User");

            UserInfos.LoadTable(serMsg);
            MainUser = UserInfos.GetUserById(User_ID);
        }
Example #4
0
    public override void Load(params object[] input)
    {
        JSONTable_Friends  friends = SyncData.FriendTable;
        JSONTable_UserInfo users   = SyncData.UserInfos;

        for (int i = 0; i < friends.Count; i++)
        {
            FriendRow info = friends.ReadOnlyRows[i];
            if (info.AcceptTime != 0.0f)
            {
                UserInfoRow user = users.GetUserById(info.ID_Player);
                AddFriendTag(info, user);
            }
        }
    }