Exemplo n.º 1
0
        public void WorldLoaded(World world, WorldRenderer wr)
        {
            domainIndexes = new Dictionary <uint, MovementClassDomainIndex>();
            var locomotors      = world.WorldActor.TraitsImplementing <Locomotor>().Where(l => !string.IsNullOrEmpty(l.Info.Name));
            var movementClasses = locomotors.Select(t => t.MovementClass).Distinct();

            foreach (var mc in movementClasses)
            {
                domainIndexes[mc] = new MovementClassDomainIndex(world, mc);
            }
        }
Exemplo n.º 2
0
        public void WorldLoaded(World world, WorldRenderer wr)
        {
            domainIndexes = new Dictionary <uint, MovementClassDomainIndex>();
            var movementClasses =
                world.Map.Rules.Actors.Where(ai => ai.Value.Traits.Contains <MobileInfo>())
                .Select(ai => (uint)ai.Value.Traits.Get <MobileInfo>().GetMovementClass(world.TileSet)).Distinct();

            foreach (var mc in movementClasses)
            {
                domainIndexes[mc] = new MovementClassDomainIndex(world, mc);
            }
        }