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

games.rednblack.editor.renderer.commons.RefreshableComponent Maven / Gradle / Ivy

The newest version!
package games.rednblack.editor.renderer.commons;

import com.artemis.PooledComponent;

public abstract class RefreshableComponent extends PooledComponent {
    protected boolean needsRefresh = false;

    public void scheduleRefresh() {
        needsRefresh = true;
    }

    public void executeRefresh(int entity) {
        if (needsRefresh) {
            refresh(entity);
            needsRefresh = false;
        }
    }

    protected abstract void refresh(int entity);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy