コード例 #1
0
        public static VolumetricFog GenerateFog(Point3F pos, Point3F scale, ColorI color, float density)
        {
            VolumetricFog fog = new VolumetricFog()
            {
                ShapeName   = "data/FPSGameplay/art/environment/Fog_Sphere.dts",
                FogColor    = color,
                FogDensity  = 0.0f,
                IgnoreWater = false,
                MinSize     = 250f,
                FadeSize    = 750f,
                Texture     = "data/FPSGameplay/art/environment/FogMod_heavy.dds",
                Tiles       = 1f,
                ModStrength = 0.2f,
                PrimSpeed   = new Point2F(-0.01f, 0.04f),
                SecSpeed    = new Point2F(0.02f, 0.02f),
                Position    = pos,
                //TODO Rotation = "0 0 1 20.354",
                Scale   = scale,
                CanSave = true,
                CanSaveDynamicFields = true,
            };

            fog.SetFieldValue("rotation", "0 0 1 20.354");

            if (fog.RegisterObject())
            {
                Core.SimObjects.Collections.MissionCleanup.Add(fog);

                fog.Thicken(500, density);
            }

            return(fog);
        }
コード例 #2
0
 /// <summary>Changes the color of the fog</summary>
 /// <description>
 /// .
 /// </description>
 /// <param name="new_color">the new fog color (rgb 0-255, a is ignored.</param>
 public void SetFogColor(ColorI new_color)
 {
     new_color.Alloc();             InternalUnsafeMethods.SetFogColor__Args _args = new InternalUnsafeMethods.SetFogColor__Args()
     {
         new_color = new_color.internalStructPtr,
     };
     InternalUnsafeMethods.SetFogColor()(ObjectPtr, _args);
     new_color.Free();
 }
コード例 #3
0
        /// <description>
        /// (int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)
        /// </description>
        public void AddScheme(uint id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL) {
fontColor.Alloc();fontColorHL.Alloc();fontColorSEL.Alloc();             InternalUnsafeMethods.AddScheme__Args _args = new InternalUnsafeMethods.AddScheme__Args() {
                id = id,
                fontColor = fontColor.internalStructPtr,
                fontColorHL = fontColorHL.internalStructPtr,
                fontColorSEL = fontColorSEL.internalStructPtr,
             };
             InternalUnsafeMethods.AddScheme()(ObjectPtr, _args);
fontColor.Free();fontColorHL.Free();fontColorSEL.Free();        }
コード例 #4
0
 public void addScheme(int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)
 {
     pInvokes.m_ts.fnGuiPopUpMenuCtrlEx_addScheme(_ID, id, fontColor.AsString(), fontColorHL.AsString(), fontColorSEL.AsString());
 }
コード例 #5
0
 public virtual void addScheme(uint id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)
 {
     InternalUnsafeMethods.addScheme(ObjectPtr, id, fontColor.ToStruct(), fontColorHL.ToStruct(), fontColorSEL.ToStruct());
 }
コード例 #6
0
 /// <summary>
 /// @brief Create a new scheme and add it to the list of choices for when a new text entry is added.
 ///                    @param id Numerical id associated with this scheme
 ///                    @param fontColor The base text font color. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.
 ///                    @param fontColorHL Color of text when being highlighted. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.
 ///                    @param fontColorSel Color of text when being selected. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.)
 ///
 /// </summary>
 public void addScheme(int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)
 {
     TorqueScriptTemplate.m_ts.fnGuiPopUpMenuCtrlEx_addScheme(_mSimObjectId, id, fontColor.AsString(), fontColorHL.AsString(), fontColorSEL.AsString());
 }
コード例 #7
0
 public virtual void SetFogColor(ColorI new_color)
 {
     InternalUnsafeMethods.SetFogColor(ObjectPtr, new_color.ToStruct());
 }
コード例 #8
0
 public void SetFogColor(ColorI new_color)
 {
     pInvokes.m_ts.fnVolumetricFog_SetFogColor(_ID, new_color.AsString());
 }