Esempio n. 1
0
 public void onClick(MapViewWindow source, Location loc, Point ab)
 {
     if (anchor == UNPLACED)
     {
         if (remover)
         {
             if (null == World.world[loc] as HalfDividedVoxel)
             {
                 return;
             }
         }
         else
         {
             if (!HalfVoxelContribution.canBeBuilt(loc))
             {
                 return;
             }
         }
         anchor                 = loc;
         currentPos             = loc;
         curSide                = getSide(ab);
         sameLevelDisambiguator = new SameLevelDisambiguator(anchor.z);
     }
     else
     {
         if (!currentPos.Equals(anchor))
         {
             onVoxelSelected(anchor, front, currentSide);
         }
         World.world.onVoxelUpdated(anchor);
         anchor = UNPLACED;
     }
 }
 public ContributionReference(HalfVoxelContribution hvc, int color, int hilight, Direction front, PlaceSide side)
 {
     this.contrib    = hvc;
     this.colorIdx   = color;
     this.hilightIdx = hilight;
     this.placeSide  = side;
     this.frontface  = front;
     this.patternIdx = SpriteSet.getIndexOf(front, side);
 }
Esempio n. 3
0
 public void Add(HalfVoxelContribution contrib)
 {
     arr.Add(contrib);
 }
 public EmptyReference(HalfVoxelContribution hvc, int color, int hilight, Direction front, PlaceSide side)
     : base(null, -1, -1, front, side)
 {
 }
Esempio n. 5
0
 public HVControllerImpl(HalfVoxelContribution _contrib, IControllerSite _site, bool _remove)
 {
     this.contrib = _contrib;
     this.site    = _site;
     this.remover = _remove;
 }