public void _setShadowVizLight(string light, bool force)
        {
            coGuiControl AL_ShadowVizOverlayCtrl = "AL_ShadowVizOverlayCtrl";


            if (!AL_ShadowVizOverlayCtrl.isAwake())
            {
                return;
            }
            if (AL_ShadowVizOverlayCtrl.call("isLocked").AsBool() && !force)
            {
                return;
            }

            string sizeAndAspect = "";

            if (console.isObject(light))
            {
                string clientLight = serverToClientObject(light); //console.Call("serverToClientObject", new string[] { light });
                sizeAndAspect = Util._setShadowVizLight(clientLight);
            }
            console.Call(AL_ShadowVizOverlayCtrl.findObjectByInternalName("MatCtrl", true), "setMaterial", new[] { "AL_ShadowVisualizeMaterial" });
            string text = "ShadowViz";

            if (console.isObject(light))
            {
                text = text + ":" + sizeAndAspect.Split(' ')[0] + " x " + sizeAndAspect.Split(' ')[1];
            }

            console.SetVar(AL_ShadowVizOverlayCtrl.findObjectByInternalName("WindowCtrl", true), text);
        }
Esempio n. 2
0
        public void onMissionDownloadPhase1(string missionName, string musicTrack)
        {
            console.print("------------>onMissionDownloadPhase1('" + missionName + "', '" + musicTrack + "')");
            // Load the post effect presets for this mission.
            string path = "levels/" + Util.fileBase(missionName) + console.GetVarString("$PostFXManager::fileExtension");

            if (console.Call("isScriptFile", new[] { path }).AsBool())
            {
                PostFXManagerloadPresetHandler(path);
            }
            else
            {
                PostFXManagersettingsApplyDefaultPreset("PostFXManager");
            }

            // Close and clear the message hud (in case it's open)

            coGuiControl MessageHud = "MessageHud";

            if (MessageHud.isObject())
            {
                MessageHud.call("close");
            }

            // Reset the loading progress controls:

            coGuiControl LoadingProgress = "LoadingProgress";

            if (LoadingProgress.isObject())
            {
                ((coGuiControl)"LoadingProgress").setValue("0");
                ((coGuiTextCtrl)"LoadingProgressTxt").setValue("LOADING DATABLOCKS");
                ((coGuiCanvas)"canvas").repaint(0);
            }
        }