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); } } }
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)); }
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)); }