예제 #1
0
        public void ResetParameter(WaterMaterials.ColorParameter parameter)
        {
            int num = WaterMaterials._ParameterHashes[(int)parameter];

            for (int i = 0; i < this._VectorOverrides.Length; i++)
            {
                if (this._VectorOverrides[i].Hash == num)
                {
                    WaterMaterials.RemoveArrayElementAt <WaterMaterials.WaterParameterVector4>(ref this._VectorOverrides, i);
                }
            }
        }
예제 #2
0
        public Color GetParameterValue(WaterMaterials.ColorParameter parameter)
        {
            int num = WaterMaterials._ParameterHashes[(int)parameter];

            for (int i = 0; i < this._VectorOverrides.Length; i++)
            {
                if (this._VectorOverrides[i].Hash == num)
                {
                    return(this._VectorOverrides[i].Value);
                }
            }
            return(this._Water.Renderer.PropertyBlock.GetVector(num));
        }
예제 #3
0
        public WaterMaterials.WaterParameterVector4 GetParameterOverride(WaterMaterials.ColorParameter parameter)
        {
            int num = WaterMaterials._ParameterHashes[(int)parameter];

            for (int i = 0; i < this._VectorOverrides.Length; i++)
            {
                if (this._VectorOverrides[i].Hash == num)
                {
                    return(this._VectorOverrides[i]);
                }
            }
            Vector4 vector = this._Water.Renderer.PropertyBlock.GetVector(num);

            Array.Resize <WaterMaterials.WaterParameterVector4>(ref this._VectorOverrides, this._VectorOverrides.Length + 1);
            return(this._VectorOverrides[this._VectorOverrides.Length - 1] = new WaterMaterials.WaterParameterVector4(this._Water.Renderer.PropertyBlock, num, vector));
        }