Esempio n. 1
0
            public override void draw(DrawContext display, Point pt, int heightCutDiff)
            {
                PThreeDimStructure o = owner;

                int zdiff = o.type.size.z - (this.location.z - o.baseLocation.z);

                if (heightCutDiff < 0 || zdiff < heightCutDiff)
                {
                    // draw in a normal mode
                    sprite.draw(display.surface, pt);
                }
                else
                {
                    // drawing in the height cut mode
                    if (this.location.z == o.baseLocation.z)
                    {
                        ResourceUtil.emptyChip.drawShape(display.surface, pt, o.heightCutColor);
                    }
                }
            }
Esempio n. 2
0
 internal VoxelImpl(PThreeDimStructure _owner, WorldLocator wloc)
     : base(_owner, wloc)
 {
     setSprite();
 }
Esempio n. 3
0
            private void setSprite()
            {
                PThreeDimStructure o = owner;

                sprite = o.type.getSprite(location - o.baseLocation);
            }