Back to project page Station42.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...
If you think the Android project Station42 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.station42.hopping; //www. j ava 2s .c om import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input.Keys; import com.station42.base.Engine; import com.station42.base.EngineUpdateListener; import com.station42.base.Entity; import com.station42.player.mouse.EntityMouseState; public class PlayerHopper implements EngineUpdateListener { Entity player; public PlayerHopper(Entity player) { this.player = player; } @Override public void update(Engine engine, float delta) { HoppingAction hoppingAction = player.getComponent(HoppingAction.class); EntityMouseState mouseState = player.getComponent(EntityMouseState.class); if (hoppingAction != null && mouseState != null) { hoppingAction.setWantHopping(mouseState.isRightDown()); } } }