public void Init(CloudEmitter cloudEmitter) { foreach (LightningType type in this.LightningTypes) { type.Init(cloudEmitter); } }
public void Init(CloudEmitter cloudEmitter) { this.DumbMPB = new MaterialPropertyBlock(); this.DumbMPB.SetFloat("_TexOffsetX", 0f); this.DumbMPB.SetFloat("_TexScaleX", 0.25f); this.DumbMPB.SetFloat("_EmissionScaler", 1f); for (int i = 0; i < this._buffer.Length; i++) { this._buffer[i] = new Lightning(); this._buffer[i].Init(this.Prefab, cloudEmitter.transform, this.VisibleLightningRatio > 0.01f); } }
private void Init() { try { this._skyRenderer = base.transform.Find("Sky").gameObject.GetComponent <Renderer>(); this._skyMPB = new MaterialPropertyBlock(); this._cloudEmitter = base.GetComponentInChildren <CloudEmitter>(true); if (GlobalDataManager.metaConfig == null) { GlobalDataManager.Refresh(); } this.IsUpdateAtmosphereAuto = true; this.UpdateAtmosphere(); this._isSomethingWrong = false; } catch { this._isSomethingWrong = true; throw; } }