NOTE:Clients of this class must call {@link #update(float)}, so that friction and other calculations can be applied. This is normally done within the client's own update method and followed by some usage of the {@link #position()} method. For example:
{@code XYFlicker flicker = new XYFlicker(); Layer layer = ...;}{ layer.addListener(flicker); } void update (int delta) { flicker.update(delta); layer.setTranslation(flicker.position().x(), flicker.position().y()); } }TODO: figure out how to implement with two Flickers. could require some changes therein since you probably don't want them to have differing states, plus 2x clicked signals is wasteful
|
|