// Token: 0x06000092 RID: 146 RVA: 0x00005504 File Offset: 0x00003704 public void CreateEffect(GameObject prefab, LVector2 pos) { bool flag = prefab == null; if (!flag) { LFloat liveTime = prefab.GetComponent <IRollbackEffect>().LiveTime; EffectProxy effectProxy = new EffectProxy(); GameObject gameObject = null; bool flag2 = !this._globalStateService.IsVideoLoading; if (flag2) { gameObject = Object.Instantiate <GameObject>(prefab, base.transform.position + pos.ToVector3(), Quaternion.identity); } bool flag3 = this.tail == null; if (flag3) { this.head = (this.tail = effectProxy); } else { effectProxy.pre = this.tail; this.tail.next = effectProxy; this.tail = effectProxy; } effectProxy.DoStart(base.CurTick, (gameObject != null) ? gameObject.GetComponent <IRollbackEffect>() : null, liveTime); } }
public void CreateEffect(GameObject prefab, LVector2 pos) { if (prefab == null) { return; } var liveTime = prefab.GetComponent <IRollbackEffect>().LiveTime; var comp = new EffectProxy(); GameObject go = null; if (!_constStateService.IsVideoLoading) { go = GameObject.Instantiate(prefab, transform.position + pos.ToVector3(), Quaternion.identity); } if (tail == null) { head = tail = comp; } else { comp.pre = tail; tail.next = comp; tail = comp; } comp.DoStart(CurTick, go?.GetComponent <IRollbackEffect>(), liveTime); }