public static boolean isGameLoop(){
  return Thread.currentThread() == get().loopThread;
}

public static boolean isGameLoop ( ) { return Thread . currentThread ( ) == get ( ) . loopThread ; }
check if the code is running in the game loop .
