2018-12-27 11:58:08 +00:00
|
|
|
/*
|
|
|
|
* This file is part of ComputerCraft - http://www.computercraft.info
|
2019-01-01 01:10:18 +00:00
|
|
|
* Copyright Daniel Ratcliffe, 2011-2019. Do not distribute without permission.
|
2018-12-27 11:58:08 +00:00
|
|
|
* Send enquiries to dratcliffe@gmail.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
package dan200.computercraft.client;
|
|
|
|
|
2019-01-12 16:27:40 +00:00
|
|
|
public final class FrameInfo
|
2018-12-27 11:58:08 +00:00
|
|
|
{
|
2019-01-12 16:27:40 +00:00
|
|
|
private static int tick;
|
|
|
|
private static long renderFrame;
|
2018-12-27 11:58:08 +00:00
|
|
|
|
|
|
|
private FrameInfo()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-01-12 16:27:40 +00:00
|
|
|
public static boolean getGlobalCursorBlink()
|
2018-12-27 11:58:08 +00:00
|
|
|
{
|
|
|
|
return (tick / 8) % 2 == 0;
|
|
|
|
}
|
|
|
|
|
2019-01-12 16:27:40 +00:00
|
|
|
public static long getRenderFrame()
|
2018-12-27 11:58:08 +00:00
|
|
|
{
|
|
|
|
return renderFrame;
|
|
|
|
}
|
|
|
|
|
2019-04-03 22:27:10 +00:00
|
|
|
public static void onTick()
|
2018-12-27 11:58:08 +00:00
|
|
|
{
|
2019-04-03 22:27:10 +00:00
|
|
|
tick++;
|
2018-12-27 11:58:08 +00:00
|
|
|
}
|
|
|
|
|
2019-04-03 22:27:10 +00:00
|
|
|
public static void onRenderFrame()
|
2018-12-27 11:58:08 +00:00
|
|
|
{
|
2019-04-03 22:27:10 +00:00
|
|
|
renderFrame++;
|
2018-12-27 11:58:08 +00:00
|
|
|
}
|
|
|
|
}
|