public override void Draw() { int offsetY = 0; if (CubeWorldPlayerPreferences.showFPS) { GUI.Label(new Rect(0, offsetY++ *20, Screen.width, 25), "FPS: " + playerGUI.lastFps); } if (CubeWorldPlayerPreferences.showHelp) { GUI.Box(new Rect(0, offsetY * 20, 300, 100), ""); GUI.Label(new Rect(0, offsetY * 20, 300, 100), "Press 'I' to enter Inventory\nRight click to add objects\nLeft click to activate / destroy them\nYou can disable this dialog from the options screen! (press ESCAPE)"); offsetY += 5; } if (CubeWorldPlayerPreferences.showEngineStats) { CubeWorld.World.CubeWorldStats stats = playerGUI.playerUnity.player.world.stats; string memStats = "Memory used: " + (System.GC.GetTotalMemory(false) / (1024 * 1024)) + " MB"; string multiplayerStats = (MultiplayerStats.Singleton.connected) ? MultiplayerStats.Singleton.ToString() : ""; GUI.Label(new Rect(0, offsetY * 20, Screen.width, 60), "Stats: " + stats.ToString() + "\n" + memStats + "\n" + multiplayerStats); offsetY += 3; } if (showLog) { GUI.TextArea(new Rect(0, offsetY * 20, Screen.width, 200), CWConsole.Singleton.TextLog); offsetY += 10; } GUI.Box(new Rect((Screen.width - 10) / 2, (Screen.height - 10) / 2, 10, 10), "+"); }
public void Clear() { stats = null; sectorManager.Clear(); sectorManager = null; tileManager.Clear(); tileManager = null; itemManager.Clear(); itemManager = null; avatarManager.Clear(); avatarManager = null; dayCycleManager.Clear(); dayCycleManager = null; gameplay.Clear(); gameplay = null; }