Example #1
0
        // Set the Sun/Moon Ambient/Diffuse colors of area
        // type = NWNX_AREA_COLOR_TYPE_*
        // color = FOG_COLOR_*
        //
        // The color can also be represented as a hex RGB number if specific color shades are desired.
        // The format of a hex specified color would be 0xFFEEDD where
        // FF would represent the amount of red in the color
        // EE would represent the amount of green in the color
        // DD would represent the amount of blue in the color.
        public static void SetSunMoonColors(uint area, AreaColorType type, int color)
        {
            Internal.NativeFunctions.nwnxSetFunction(PluginName, "SetSunMoonColors");

            Internal.NativeFunctions.nwnxPushInt(color);
            Internal.NativeFunctions.nwnxPushInt((int)type);
            Internal.NativeFunctions.nwnxPushObject(area);
            Internal.NativeFunctions.nwnxCallFunction();
        }
Example #2
0
        /// <summary>
        /// Set the Sun/Moon Ambient/Diffuse colors of area
        /// type = NWNX_AREA_COLOR_TYPE_*
        /// color = FOG_COLOR_*
        ///
        /// The color can also be represented as a hex RGB number if specific color shades are desired.
        /// The format of a hex specified color would be 0xFFEEDD where
        /// FF would represent the amount of red in the color
        /// EE would represent the amount of green in the color
        /// DD would represent the amount of blue in the color.
        /// </summary>
        /// <param name="area"></param>
        /// <param name="type"></param>
        /// <param name="color"></param>
        public static void SetSunMoonColors(NWGameObject area, AreaColorType type, int color)
        {
            string sFunc = "SetSunMoonColors";

            NWNXCore.NWNX_PushArgumentInt(NWNX_Area, sFunc, color);
            NWNXCore.NWNX_PushArgumentInt(NWNX_Area, sFunc, (int)type);
            NWNXCore.NWNX_PushArgumentObject(NWNX_Area, sFunc, area);
            NWNXCore.NWNX_CallFunction(NWNX_Area, sFunc);
        }
Example #3
0
        // Get the Sun/Moon Ambient/Diffuse colors of area
        // type = NWNX_AREA_COLOR_TYPE_*
        //
        // Returns FOG_COLOR_* or a custom value, -1 on error
        public static int GetSunMoonColors(uint area, AreaColorType type)
        {
            Internal.NativeFunctions.nwnxSetFunction(PluginName, "GetSunMoonColors");

            Internal.NativeFunctions.nwnxPushInt((int)type);
            Internal.NativeFunctions.nwnxPushObject(area);
            Internal.NativeFunctions.nwnxCallFunction();

            return(Internal.NativeFunctions.nwnxPopInt());
        }