public coGuiControl sfxGetActiveStateInGroup(coSimSet group)
            {
            for (uint i = 0; i < group.getCount(); i++)
                {
                coGuiControl obj = group.getObject(i);
                if (obj.isMemberOfClass("SFXState"))
                    continue;

                if (obj.isActive())
                    return obj;
                }
            return "";
            }
Beispiel #2
0
 public void HDRPostFXpreProcess(coSimSet thisobj)
     {
     coPostEffect combinePass = thisobj.findObjectByInternalName("combinePass", true);
     if (combinePass[".texture[3]"] != sGlobal["$HDRPostFX::colorCorrectionRamp"])
         combinePass.setTexture(3, sGlobal["$HDRPostFX::colorCorrectionRamp"]);
     }
Beispiel #3
0
 public void sfxResume(coSimSet pauseSet)
     {
     if (!console.isObject(pauseSet))
         pauseSet = sGlobal["SFXPausedSet"];
     for (uint i = 0; i < pauseSet.getCount(); i++)
         ((coSFXSource)pauseSet.getObject(i)).play(-1);
     pauseSet.clear();
     }
Beispiel #4
0
        public void sfxPause(coSimSet channels, coSimSet pauseSet)
            {
            if (!console.isObject(pauseSet))
                pauseSet = sGlobal["SFXPausedSet"];

            coSimSet SFXSourceSet = sGlobal["SFXSourceSet"];

            for (uint i = 0; i < SFXSourceSet.getCount(); i++)
                {
                coSimObject source = SFXSourceSet.getObject(i);
                string channel = sfxGroupToOldChannel(source.getGroup());

                //console.Call(source, "getGroup"));
                throw new Exception("The find word function doesn't exists... wtf?");
                //if (channel != "" && console.Call("findWord", new string[] { channels, channel }).AsInt() == -1)
                //    continue;
                ////SFXSource.pause(source, -1);
                //pauseSet.pushToBack(source);
                }
            }
Beispiel #5
0
 public void sfxSetChannelVolume(coSimSet channel, float volume)
     {
     coSFXSource obj = sfxOldChannelToGroup(channel);
     if (obj.isObject())
         obj.setVolume(volume);
     }
Beispiel #6
0
 public string sfxGetChannelVolume(coSimSet channel)
     {
     coSFXSource obj = sfxOldChannelToGroup(channel);
     return obj.isObject() ? obj.getVolume().AsString() : "0";
     }
Beispiel #7
0
        public void sfxStopAll(coSimSet channel)
            {
            channel = sfxOldChannelToGroup(channel);

            if (!channel.isObject())
                return;

            for (uint i = 0; i < channel.getCount(); i++)
                ((coSFXSource)channel.getObject(i)).stop(-1);
            //SFXSource.stop(channel.getObject(i), -1);
            }
Beispiel #8
0
 public coSFXSource sfxOldChannelToGroup(coSimSet channel)
     {
     return sGlobal["$AudioChannels[" + channel + "]"];
     }
        public void PostFXManagersettingsRefreshHDR(coSimSet thisobj)
            {
            //Apply the enabled flag 
            console.Call("ppOptionsEnableHDR", "setValue", new[] { console.GetVarString("$PostFXManager::PostFX::EnableHDR") });
            console.Call("ppOptionsHDRBloom", "setValue", new[] { console.GetVarString("$HDRPostFX::enableBloom") });
            console.Call("ppOptionsHDRBloomBlurBrightPassThreshold", "setValue", new[] { console.GetVarString("$HDRPostFX::brightPassThreshold") });
            console.Call("ppOptionsHDRBloomBlurMean", "setValue", new[] { console.GetVarString("$HDRPostFX::gaussMean") });
            console.Call("ppOptionsHDRBloomBlurMultiplier", "setValue", new[] { console.GetVarString("$HDRPostFX::gaussMultiplier") });
            console.Call("ppOptionsHDRBloomBlurStdDev", "setValue", new[] { console.GetVarString("$HDRPostFX::gaussStdDev") });
            console.Call("ppOptionsHDRBrightnessAdaptRate", "setValue", new[] { console.GetVarString("$HDRPostFX::adaptRate") });
            console.Call("ppOptionsHDREffectsBlueShift", "setValue", new[] { console.GetVarString("$HDRPostFX::enableBlueShift") });


            console.SetVar("ppOptionsHDREffectsBlueShiftColor.BaseColor", console.GetVarString("$HDRPostFX::blueShiftColor"));
            console.SetVar("ppOptionsHDREffectsBlueShiftColor.PickColor", console.GetVarString("$HDRPostFX::blueShiftColor"));

            console.Call("ppOptionsHDRKeyValue", "setValue", new[] { console.GetVarString("$HDRPostFX::keyValue") });
            console.Call("ppOptionsHDRMinLuminance", "setValue", new[] { console.GetVarString("$HDRPostFX::minLuminace") });
            console.Call("ppOptionsHDRToneMapping", "setValue", new[] { console.GetVarString("$HDRPostFX::enableToneMapping") });
            console.Call("ppOptionsHDRToneMappingAmount", "setValue", new[] { console.GetVarString("$HDRPostFX::enableToneMapping") });
            console.Call("ppOptionsHDRWhiteCutoff", "setValue", new[] { console.GetVarString("$HDRPostFX::whiteCutoff") });

            console.SetVar(thisobj.findObjectByInternalName("ColorCorrectionFileName", true), console.GetVarString("$HDRPostFX::colorCorrectionRamp"));
            }
Beispiel #10
0
        public string MissionGroupRespawnTurret(coSimSet thisobj, coTurretShapeData datablock, coTurretShape classname, TransformF transform, bool isstatic, bool respawn)
            {
            Torque_Class_Helper turret = new Torque_Class_Helper(classname, "");
            turret.Props.Add("datablock", datablock);
            turret.Props.Add("static", isstatic.AsString());
            turret.Props.Add("respawn", respawn.AsString());
            coTurretShape turretid = turret.Create();

            turretid.setTransform(transform);
            ((coSimSet)"MissioinGroup").pushToBack(turretid);
            return turretid;
            }