示例#1
0
        public void ResetParameter(WaterMaterials.VectorParameter 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 Vector4 GetParameterValue(WaterMaterials.VectorParameter 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.VectorParameter 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));
        }