Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }