Package com.pointcliki.grid.GridManager

Examples of com.pointcliki.grid.GridManager.GridEvent


 
  private void swap() {
   
    // Record old tile
    fOldTile = map().tile(fLayer, fTile.x(), fTile.y());
    mapManager().parent().manager(GridManager.class).dispatcher().dispatch(fTile, "tilechange", new GridEvent());
   
    // Swap with new tile
    int tileid = map().tileset(fLayer).tile(fNewTile);
   
    if (tileid >= 0) {
     
      map().tile(fLayer, fTile.x(), fTile.y(), tileid);
     
      // Queue if flip
      frameManager().queue(new Minion<FrameEvent>() {
        @Override
        public long run(Dispatcher<FrameEvent> dispatcher, String type, FrameEvent event) {
          map().tile(fLayer, fTile.x(), fTile.y(), fOldTile);
          mapManager().parent().manager(GridManager.class).dispatcher().dispatch(fTile, "tilechange", new GridEvent());
          return Minion.FINISH;
        }
      }, (long) Math.floor(timeManager().frameDuration(fFlip)));
    }
  }
View Full Code Here


        }
       
        break;
      }
    }
    if (found) mapManager().parent().manager(GridManager.class).dispatcher().dispatch(xy, "tilechange", new GridEvent());
    return found;
  }
View Full Code Here

TOP

Related Classes of com.pointcliki.grid.GridManager.GridEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.