Пример #1
0
        private T CreateRoom <T>(AgentFactory agentFactory, string roomKey)
        {
            RoomMetadata roomMetaData = contentManager.GetRoomMetadata(roomKey);
            string       mapPath      = contentManager.GetContentPath(roomMetaData.MapPathKey);
            TiledMap     tiledMap     = new TiledMap(mapPath, renderer, agentFactory);

            return((T)Activator.CreateInstance(typeof(T), roomMetaData.Name, roomMetaData.Price, roomMetaData.Description, roomMetaData.IconKey, tiledMap));
        }
Пример #2
0
 public Library CreateLibrary(AgentFactory agentFactory)
 {
     return(CreateRoom <Library>(agentFactory, "Library"));
 }