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

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

The newest version!
package games.rednblack.editor.renderer.systems.action.logic;

import games.rednblack.editor.renderer.systems.action.data.RunnableData;

/**
 * Created by ZeppLondon on 10/15/2015.
 */
public class RunnableAction extends ActionLogic {
    @Override
    public boolean act(float delta, int entity, T actionData) {
        if (!actionData.ran) {
            actionData.ran = true;
            run(entity, actionData);
        }
        return true;
    }

    public void run(int entity, T actionData) {
        if (actionData.runnable != null)
            actionData.runnable.run(entity);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy