Пример #1
0
 public void AddWorld(IWorld world)
 {
     Worlds.Add(world);
     world.BlockRepository = BlockRepository;
     world.ChunkGenerated += HandleChunkGenerated;
     world.BlockChanged += HandleBlockChanged;
     var manager = new EntityManager(this, world);
     EntityManagers.Add(manager);
     var lighter = new WorldLighting(world, BlockRepository);
     WorldLighters.Add(lighter);
 }
Пример #2
0
 public MobManager(EntityManager manager)
 {
     EntityManager = manager;
     SpawnRules = new Dictionary<Dimension, List<ISpawnRule>>();
 }
Пример #3
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));
 }
Пример #4
0
 public void AddWorld(IWorld world)
 {
     Worlds.Add(world);
     world.BlockRepository = BlockRepository;
     world.BlockChanged += HandleBlockChanged;
     var manager = new EntityManager(this, world);
     EntityManagers.Add(manager);
 }