/** * Returns if commonly used things (like the AsteroidsFrame and Background) are null, and thus are * loading. * * @return if common graphics classes are null! * @since April 10, 2008 */ public static boolean isStuffNull() { return (loading || MainWindow.frame() == null || localPlayerID == -1 || MainWindow.frame().getPanel().getStarBackground() == null); }
/** * Returns the star background. * * @return the star background, as seen in the frame's panel * @since April 10, 2008 */ public static Background getStarBackground() { if (isStuffNull()) return null; else return MainWindow.frame().getPanel().getStarBackground(); }
public static void dispose() { GameLoop.stopLoop(); MainWindow.frame().close(); localPlayerID = -1; }