/// <summary> /// DaggerfallAutomapWindow script will use this to signal this script to switch to automap rendering mode "wireframe" /// </summary> public void switchToAutomapRenderModeWireframe() { currentAutomapRenderMode = AutomapRenderMode.Wireframe; Shader.EnableKeyword("AUTOMAP_RENDER_MODE_WIREFRAME"); Shader.DisableKeyword("AUTOMAP_RENDER_MODE_TRANSPARENT"); }
/// <summary> /// DaggerfallAutomapWindow script will use this to signal this script to switch to the next available automap rendering mode /// </summary> public void switchToNextAutomapRenderMode() { int numberOfAutomapRenderModes = Enum.GetNames(typeof(AutomapRenderMode)).Length; currentAutomapRenderMode++; if ((int)currentAutomapRenderMode > numberOfAutomapRenderModes - 1) // first mode is mode 0 -> so use numberOfAutomapRenderModes-1 for comparison currentAutomapRenderMode = 0; switch (currentAutomapRenderMode) { default: case AutomapRenderMode.Transparent: Shader.DisableKeyword("AUTOMAP_RENDER_MODE_WIREFRAME"); Shader.EnableKeyword("AUTOMAP_RENDER_MODE_TRANSPARENT"); break; case AutomapRenderMode.Wireframe: Shader.EnableKeyword("AUTOMAP_RENDER_MODE_WIREFRAME"); Shader.DisableKeyword("AUTOMAP_RENDER_MODE_TRANSPARENT"); break; case AutomapRenderMode.Cutout: Shader.DisableKeyword("AUTOMAP_RENDER_MODE_WIREFRAME"); Shader.DisableKeyword("AUTOMAP_RENDER_MODE_TRANSPARENT"); break; } }
/// <summary> /// DaggerfallAutomapWindow script will use this to signal this script to switch to automap rendering mode "transparent" /// </summary> public void switchToAutomapRenderModeTransparent() { currentAutomapRenderMode = AutomapRenderMode.Transparent; Shader.DisableKeyword("AUTOMAP_RENDER_MODE_WIREFRAME"); Shader.EnableKeyword("AUTOMAP_RENDER_MODE_TRANSPARENT"); }