Search in sources :

Example 1 with GearCluster

use of eidolons.libgdx.gui.generic.GearCluster in project Eidolons by IDemiurge.

the class FacingPanel method getGearListener.

private EventListener getGearListener(boolean clockwise) {
    return new ClickListener() {

        @Override
        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
            // GuiEventManager
            WaitMaster.receiveInput(WAIT_OPERATIONS.ACTION_INPUT, new ActionInput(dataSource.getTurnAction(clockwise), new Context(dataSource.getEntity().getRef())));
            GearCluster gear = clockwise ? gearsClockwise : gearsAntiClockwise;
            gear.activeWork(0.25f, 0.5f);
            return super.touchDown(event, x, y, pointer, button);
        }
    };
}
Also used : Context(main.game.logic.action.context.Context) ActionInput(eidolons.game.core.ActionInput) GearCluster(eidolons.libgdx.gui.generic.GearCluster) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Aggregations

InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)1 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)1 ActionInput (eidolons.game.core.ActionInput)1 GearCluster (eidolons.libgdx.gui.generic.GearCluster)1 Context (main.game.logic.action.context.Context)1