예제 #1
0
 public void MakeNewFriend(string userID)
 {
     if (_userData.ContainsKey(userID))
     {
         return;
     }
     _userData[userID] = new MetaGenUser {
         default_public = true, default_recording = true, is_banned = false, is_friend = true, total_recorded = 0f, total_recorded_public = 0f, userId = userID
     };
     _should_update = true;
 }
예제 #2
0
        public MetaGenUser MakeNewUser(string userID)
        {
            bool isFriend = FrooxEngine.Engine.Current.Cloud.Friends.IsFriend(userID);

            if (_userData.ContainsKey(userID))
            {
                //_userData[userID].is_friend = isFriend;
                return(_userData[userID]);
            }
            //_userData[userID] = new MetaGenUser { default_public = isFriend, default_recording = isFriend, is_banned = false, is_friend = isFriend, total_recorded = 0f, total_recorded_public = 0f, userId = userID };
            //_userData[userID] = new MetaGenUser { default_public = true, default_recording = isFriend, is_banned = false, is_friend = isFriend, total_recorded = 0f, total_recorded_public = 0f, userId = userID };
            _userData[userID] = new MetaGenUser {
                default_public = true, default_recording = true, is_banned = false, is_friend = isFriend, total_recorded = 0f, total_recorded_public = 0f, userId = userID
            };
            _should_update = true;
            return(_userData[userID]);
        }
예제 #3
0
 public void UpdateRecordedTime(string userID, float time, bool is_public = false)
 {
     UniLog.Log("Updating recorded time " + userID);
     if (_userData.ContainsKey(userID))
     {
         _userData[userID].total_recorded += time;
         if (is_public)
         {
             _userData[userID].total_recorded_public += time;
         }
     }
     else
     {
         _userData[userID] = new MetaGenUser {
             default_public = true, default_recording = true, is_banned = false, is_friend = true, total_recorded = time, total_recorded_public = 0f, userId = userID
         };
         if (is_public)
         {
             _userData[userID].total_recorded_public = time;
         }
     }
     _should_update = true;
 }