public AbstractBuildingView( final AbstractScreen screen, MapGrid map, AbstractBuildingItem building) { mBuilding = building; mMap = map; mScreen = screen; mBuildingTexture = loadBuildingTexture(); map.setChildPosition(this, building.getX(), building.getY()); map.addActor(this); }
public void drawBuilding(Batch batch) { float csx = mMap.getCellSideX(); float csy = mMap.getCellSideY(); batch.draw(mBuildingTexture, 0, 0, csx * mBuilding.getSize().x, csy * mBuilding.getSize().y); }
@Override public void act(float delta) { mMap.setChildPosition(this, mBuilding.getX(), mBuilding.getY()); }