games.rednblack.editor.renderer.systems.action.logic.RotateByAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime-libgdx Show documentation
Show all versions of runtime-libgdx Show documentation
HyperLap2D libGDX runtime to render exported scenes
The newest version!
package games.rednblack.editor.renderer.systems.action.logic;
import games.rednblack.editor.renderer.components.TransformComponent;
import games.rednblack.editor.renderer.systems.action.data.RotateByData;
/**
* Created by ZeppLondon on 10/16/2015.
*/
public class RotateByAction extends RelativeTemporalAction {
@Override
protected void updateRelative(float percentDelta, int entity, T actionData) {
TransformComponent transformComponent = transformMapper.get(entity);
if (transformComponent == null) return;
transformComponent.rotation += actionData.amount * percentDelta;
}
}