Ejemplo n.º 1
0
        public override void ProcessEntity(PicEntity entity)
        {
            PicTypedDrawable drawable = (PicTypedDrawable)entity;

            if (null != drawable)
            {
                drawable.Transform(_transform);
            }
        }
Ejemplo n.º 2
0
 public void AddEntities(IEntityContainer container, Transform2D transform)
 {
     foreach (PicEntity entityIn in container)
     {
         if (null == entityIn)
         {
             continue;
         }
         PicTypedDrawable entityOut = (entityIn.Clone(this)) as PicTypedDrawable;
         entityOut.Transform(transform);
         _entities.Add(entityOut);
     }
 }
Ejemplo n.º 3
0
        public static PicBlock CreateNewBlock(uint id, IEntityContainer container, Transform2D transf)
        {
            PicBlock block = new PicBlock(id);

            // copies each entity from container (either block or factory) in block
            foreach (PicEntity entity in container)
            {
                PicTypedDrawable entityNew = entity.Clone(block) as PicTypedDrawable;
                entityNew.Transform(transf);
                block._entities.Add(entityNew);
            }
            return(block);
        }