All Downloads are FREE. Search and download functionalities are using the official Maven repository.

games.rednblack.editor.renderer.systems.action.logic.RotateByAction Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy