protected override void Load() { Debug.Profile("Loading assets", true, new Task(() => { Debug.Profile("Loading textures", true, new Task(() => { // Load textures TextureRegistry.Register(Texture.Load("loading_texture", "textures/gui/loading.png")); TextureRegistry.Register(Texture.Load("block_placeholder", "textures/blocks/placeholder.png")); })); Debug.Profile("Loading shaders", true, new Task(() => { // Load shaders ShaderRegistry.Register(Shader.Load("interface_shader", "shaders/ui_shader.vert", "shaders/ui_shader.frag")); })); /*Debug.Profile("Loading models", true, new Task(() => * { * * }));*/ /*Debug.Profile("Loading sounds", true, new Task(() => * { * * }));*/ /*Debug.Profile("Loading music", true, new Task(() => * { * * }));*/ })); }
protected override void PreWarm() { Debug.LogDebug($"Profiler resolution: {Debug.GetProfilerResolution():n0} ticks/sec, High res: {(Debug.IsProfilerHighResolution() ? "Yes" : "No")}"); TextureRegistry.CheckIn(); ShaderRegistry.CheckIn(); __BlockInformation.GetAllBlockInformation(); }
private void SwitchToMainMenu() { foreach (Blocks block in Blocks.Air.GetAllBlocks()) { Debug.LogDebug($"Block '{block.ToString()}' IsRendered: " + block.GetInfo().IsRendered); } }
private void OnLoadComplete() { Debug.LogInfo("Terrascape is running"); SwitchToMainMenu(); }
protected override void Shutdown(bool crashed) { Debug.LogDebug("Shutting down" + (crashed ? " because of a crash" : "")); }