public static void SetPosition(this IUserStorageCollection storage, User user, string home, Vector3 pos) { Dictionary <string, float> homeDic = new Dictionary <string, float>(); homeDic.Add("x", pos.X); homeDic.Add("y", pos.Y); homeDic.Add("z", pos.Z); storage.GetStorage(user).Set(home, homeDic); }
public static Dictionary <string, float> GetHome(this IUserStorageCollection storage, User user, string home) { try { return((Dictionary <string, float>)storage.GetStorage(user).Get(home)); } catch { return(SerializationUtils.DeserializeJson <Dictionary <string, float> >(storage.GetStorage(user).Get(home).ToString())); } }
public static void RemoveHome(this IUserStorageCollection storage, User user, string home) { storage.GetStorage(user).Remove(home); }
public static IDictionary <string, object> GetHomes(this IUserStorageCollection storage, User user) { return(storage.GetStorage(user).GetContent()); }