Exemplo n.º 1
0
        public static EntitySpawnPoint From(AbsoluteEntityCell absoluteEntityCell, Vector3 localPosition, Quaternion localRotation, Vector3 scale, string classId, IEntitySlot entitySlot)
        {
            EntitySpawnPoint spawnPoint = From(absoluteEntityCell, localPosition, localRotation, scale, classId);

            spawnPoint.BiomeType        = entitySlot.GetBiomeType();
            spawnPoint.Density          = entitySlot.GetDensity();
            spawnPoint.CanSpawnCreature = entitySlot.IsCreatureSlot();
            spawnPoint.AllowedTypes     = SlotsHelper.GetEntitySlotTypes(entitySlot);

            return(spawnPoint);
        }
Exemplo n.º 2
0
        public static List <EntitySpawnPoint> From(AbsoluteEntityCell absoluteEntityCell, EntitySlotsPlaceholder placeholder)
        {
            List <EntitySpawnPoint> esp = new List <EntitySpawnPoint>();

            foreach (EntitySlotData entitySlot in placeholder.slotsData)
            {
                esp.Add(new EntitySpawnPoint
                {
                    AbsoluteEntityCell = absoluteEntityCell,
                    BiomeType          = entitySlot.biomeType,
                    Density            = entitySlot.density,
                    Position           = absoluteEntityCell.Center + entitySlot.localPosition,
                    Rotation           = entitySlot.localRotation,
                    AllowedTypes       = SlotsHelper.GetEntitySlotTypes(entitySlot),
                });
            }

            return(esp);
        }