games.rednblack.editor.renderer.commons.RefreshableComponent 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.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);
}