games.rednblack.editor.renderer.scripts.BasicScript 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.scripts;
import com.badlogic.gdx.utils.Pool;
/**
* Created by CyberJoe on 6/19/2015.
*/
public abstract class BasicScript implements IScript, Pool.Poolable {
private Pool pool;
private boolean isInit = false;
protected int entity = -1;
public final void doInit(int item) {
if (isInit) return;
init(item);
}
@Override
public void init(int item) {
entity = item;
isInit = true;
}
public int getEntity() {
return entity;
}
@Override
public void reset() {
pool = null;
entity = -1;
isInit = false;
}
public void setPool(Pool pool) {
this.pool = pool;
}
public Pool getPool() {
return pool;
}
}