コード例 #1
0
ファイル: XFx.cs プロジェクト: nowcoder001/dragonnest_src
 public void Clear()
 {
     this._animation = null;
     this._animator  = null;
     this._particles.Clear();
     this._projectors.Clear();
     this._weaponTail = null;
 }
コード例 #2
0
ファイル: XFx.cs プロジェクト: nowcoder001/dragonnest_src
 public void InitComponent(Transform t, bool import)
 {
     this._animation = t.GetComponentInChildren <Animation>();
     this._animator  = t.GetComponentInChildren <Animator>();
     this._particles.Clear();
     t.GetComponentsInChildren <ParticleSystem>(false, this._particles);
     this._projectors.Clear();
     t.GetComponentsInChildren <Projector>(true, this._projectors);
     if (!import && XFxMgr.MaxParticleCount >= 0 && this._particles.Count > XFxMgr.MaxParticleCount)
     {
         for (int i = this._particles.Count - 1; i >= XFxMgr.MaxParticleCount; i--)
         {
             UnityEngine.Object.Destroy(this._particles[i].gameObject);
         }
         this._particles.RemoveRange(XFxMgr.MaxParticleCount, this._particles.Count - XFxMgr.MaxParticleCount);
     }
     for (int j = 0; j < this._particles.Count; j++)
     {
         this.PrePlayParticle(this._particles[j], XSingleton <XFxMgr> .singleton.CameraLayerMask);
     }
     this._weaponTail = t.GetComponentInChildren <IWeaponTail>();
 }