package sagittarius.model; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.scenes.scene2d.Stage; public class FPS extends BaseActor { // ---------- ATTRIBUTEs ---------- private int frameRate; // ---------- METHODs ---------- public FPS(Stage stage) { super(); setPosition(3, stage.getViewport().getWorldHeight() - 3); } @Override public void act(float dt) { super.act(dt); frameRate = Gdx.graphics.getFramesPerSecond(); } @Override protected String getInfo() { return frameRate + " fps"; } }