Пример #1
0
 public final void visitUnit(final Unit unit) {
   float z_offset =
       getVisuallyCorrectHeight(unit.getPositionX(), unit.getPositionY()) + unit.getOffsetZ();
   visitSelectable(
       unit_visitor,
       unit,
       z_offset,
       unit.getUnitTemplate().getSelectionRadius(),
       unit.getUnitTemplate().getSelectionHeight());
 }
Пример #2
0
 public final void markDetailPolygon(ElementRenderState render_state, int level) {
   Unit unit = (Unit) render_state.model;
   super.markDetailPolygon(render_state, level);
   UnitSupplyContainer supply_container = unit.getSupplyContainer();
   if (!render_state.render_state.isPicking()
       && unit.getAbilities().hasAbilities(Abilities.BUILD)
       && supply_container.getSupplyType() != null) {
     if (supply_container.getNumSupplies() > 0) {
       SpriteRenderer supply_sprite =
           render_state.getRenderer(
               supply_container.getSupplySpriteRenderer(supply_container.getSupplyType()));
       supply_sprite.addToRenderList(level, render_state, false);
     }
   }
 }