use of de.gg.game.events.HouseSelectionEvent in project ProjektGG by eskalon.
the class MapSelectionInputController method onSingleSelection.
private void onSingleSelection(short value) {
// Altes Objekt reseten
if (selectedObjectID >= 0) {
world.getBuildingSlots()[selectedObjectID].getBuilding().getRenderData().isSelected = false;
}
// Neues Objekt markieren
selectedObjectID = value;
if (selectedObjectID >= 0) {
world.getBuildingSlots()[selectedObjectID].getBuilding().getRenderData().isSelected = true;
}
eventBus.post(new HouseSelectionEvent(selectedObjectID, clickX, clickY));
}
Aggregations