Search in sources :

Example 1 with HouseSelectionEvent

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));
}
Also used : HouseSelectionEvent(de.gg.game.events.HouseSelectionEvent)

Aggregations

HouseSelectionEvent (de.gg.game.events.HouseSelectionEvent)1