Beispiel #1
0
        public static void LightColorMultiplier(int style, ref float r, ref float g, ref float b)
        {
            ModWaterStyle waterStyle = GetWaterStyle(style);

            if (waterStyle != null)
            {
                waterStyle.LightColorMultiplier(ref r, ref g, ref b);
                r *= Lighting.negLight * Lighting.blueWave;
                g *= Lighting.negLight * Lighting.blueWave;
                b *= Lighting.negLight * Lighting.blueWave;
            }
        }
Beispiel #2
0
        private void AutoloadWaterStyle(Type type)
        {
            ModWaterStyle waterStyle = (ModWaterStyle)Activator.CreateInstance(type);

            waterStyle.mod = this;
            string name         = type.Name;
            string texture      = (type.Namespace + "." + type.Name).Replace('.', '/');
            string blockTexture = texture + "_Block";

            if (waterStyle.Autoload(ref name, ref texture, ref blockTexture))
            {
                AddWaterStyle(name, waterStyle, texture, blockTexture);
            }
        }
Beispiel #3
0
        public static void LightColorMultiplier(int style, ref float r, ref float g, ref float b)
        {
            ModWaterStyle waterStyle = GetWaterStyle(style);

            if (waterStyle != null)
            {
                waterStyle.LightColorMultiplier(ref r, ref g, ref b);

                r *= Lighting.LegacyEngine._negLight * Lighting.LegacyEngine._blueWave;
                g *= Lighting.LegacyEngine._negLight * Lighting.LegacyEngine._blueWave;
                b *= Lighting.LegacyEngine._negLight * Lighting.LegacyEngine._blueWave;

                //TODO: Make this work with the new lighting engine.
            }
        }
Beispiel #4
0
		public void AddWaterStyle(string name, ModWaterStyle waterStyle, string texture, string blockTexture)
		{
			int style = WaterStyleLoader.ReserveStyle();
			waterStyle.mod = this;
			waterStyle.Name = name;
			waterStyle.Type = style;
			waterStyle.texture = texture;
			waterStyle.blockTexture = blockTexture;
			waterStyles[name] = waterStyle;
			WaterStyleLoader.waterStyles.Add(waterStyle);
		}