public World(WorldBuilder world_builder, WorldTemplate template, int game_id) { m_game_id = game_id; m_world_builder = world_builder; m_world_template = template; m_rooms = new Dictionary<RoomKey, Room>(new RoomKeyEqualityComparer()); }
public static WorldBuilder GetWorldBuilder( AsyncRPGDataContext db_context, ICacheAdapter cache) { WorldBuilder worldBuilder = (WorldBuilder)cache["world_builder"]; if (worldBuilder == null) { worldBuilder = new WorldBuilder(); worldBuilder.Initialize(db_context); cache["world_builder"] = worldBuilder; } return worldBuilder; }
public static WorldBuilder GetWorldBuilder( AsyncRPGDataContext db_context, ICacheAdapter cache) { WorldBuilder worldBuilder = (WorldBuilder)cache["world_builder"]; if (worldBuilder == null) { worldBuilder = new WorldBuilder(); worldBuilder.Initialize(db_context); cache["world_builder"] = worldBuilder; } return(worldBuilder); }