Esempio n. 1
0
        public void AddWorld(IWorld world)
        {
            Worlds.Add(world);
            world.BlockRepository = BlockRepository;
            world.BlockChanged   += HandleBlockChanged;
            var manager = new EntityManager(this, world);

            EntityManagers.Add(manager);
        }
Esempio n. 2
0
        public void AddWorld(IWorld world)
        {
            Worlds.Add(world);
            world.BlockRepository = BlockRepository;
            world.ChunkGenerated += HandleChunkGenerated;
            world.ChunkLoaded    += HandleChunkLoaded;
            world.BlockChanged   += HandleBlockChanged;
            var manager = new EntityManager(this, world);

            EntityManagers.Add(manager);
            var lighter = new WorldLighting(world, BlockRepository);

            WorldLighters.Add(lighter);
            foreach (var chunk in world)
            {
                HandleChunkLoaded(world, new ChunkLoadedEventArgs(chunk));
            }
        }