예제 #1
0
 protected override void SetActive(bool bShow)
 {
     if (bShow)
     {
         if (mGoEffect != null)
         {
             mGoEffect.SetActive(true);
             if (gameObjectActiveCallBack != null)
             {
                 gameObjectActiveCallBack();
             }
         }
         else
         {
             if (!string.IsNullOrEmpty(mstrPath) && ModelLoadEffect.LoadFunc != null && !bLoaded)
             {
                 bLoaded = true;
                 ModelLoadEffect.LoadFunc(mstrPath, ResLoadComplete);
             }
         }
     }
     else
     {
         if (mGoEffect != null)
         {
             mGoEffect.SetActive(false);
             if (gameObjectActiveCallBack != null)
             {
                 gameObjectActiveCallBack();
             }
         }
     }
 }
예제 #2
0
 private void OnEnable()
 {
     if (!this.mbHasLoaded)
     {
         return;
     }
     if (!this.CheckEffectValidate())
     {
         this.mbValidate = true;
         if (!string.IsNullOrEmpty(this.mstrPath) && ModelLoadEffect.LoadFunc != null)
         {
             ModelLoadEffect.LoadFunc(this.mstrPath, new AssetCallBack(this.OnValidateLoadComplete));
         }
     }
 }
예제 #3
0
 protected override void SetActive(bool bShow)
 {
     if (bShow)
     {
         if (this.mGoEffect != null)
         {
             this.mGoEffect.transform.parent        = base.transform;
             this.mGoEffect.transform.localPosition = this.mvecPos;
             this.mGoEffect.transform.localRotation = Quaternion.Euler(this.mvecRot);
             this.mGoEffect.transform.localScale    = this.mvecScale;
             this.mGoEffect.SetActive(true);
             if (this.gameObjectActiveCallBack != null)
             {
                 this.gameObjectActiveCallBack();
             }
         }
         else if (!string.IsNullOrEmpty(this.mstrPath) && ModelLoadEffect.LoadFunc != null && !this.bLoaded)
         {
             this.bLoaded = true;
             if (!ModelLoadEffect.instanceIDList.Contains(this.instanceID))
             {
                 ModelLoadEffect.instanceIDList.Add(this.instanceID);
                 ModelLoadEffect.LoadFunc(this.mstrPath, new AssetCallBack(this.ResLoadComplete));
             }
         }
     }
     else if (this.mGoEffect != null)
     {
         this.mGoEffect.SetActive(false);
         this.mGoEffect.transform.parent        = base.transform;
         this.mGoEffect.transform.localPosition = this.mvecPos;
         this.mGoEffect.transform.localRotation = Quaternion.Euler(this.mvecRot);
         this.mGoEffect.transform.localScale    = this.mvecScale;
         if (this.gameObjectActiveCallBack != null)
         {
             this.gameObjectActiveCallBack();
         }
     }
 }