예제 #1
0
파일: CloudScene.cs 프로젝트: slb1988/agame
 public void Init(CloudEmitter cloudEmitter)
 {
     foreach (LightningType type in this.LightningTypes)
     {
         type.Init(cloudEmitter);
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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;
     }
 }