public override RefParamOperator TriggerEnter(PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> atker, ITrigger inTrigger) { List <PoolObjHandle <ActorRoot> > list = new List <PoolObjHandle <ActorRoot> >(); if (this.bSrc && src) { list.Add(src); } if (this.bAtker && atker) { list.Add(atker); } if (this.RefObjList != null && this.RefObjList.Length > 0) { GameObject[] refObjList = this.RefObjList; for (int i = 0; i < refObjList.Length; i++) { GameObject gameObject = refObjList[i]; if (!(gameObject == null)) { SpawnPoint componentInChildren = gameObject.GetComponentInChildren <SpawnPoint>(); if (componentInChildren != null) { List <PoolObjHandle <ActorRoot> > spawnedList = componentInChildren.GetSpawnedList(); List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = spawnedList.GetEnumerator(); while (enumerator.MoveNext()) { PoolObjHandle <ActorRoot> current = enumerator.get_Current(); if (current) { list.Add(current); } } } else { PoolObjHandle <ActorRoot> actorRoot = ActorHelper.GetActorRoot(gameObject); if (actorRoot) { list.Add(actorRoot); } } } } } List <PoolObjHandle <ActorRoot> > .Enumerator enumerator2 = list.GetEnumerator(); while (enumerator2.MoveNext()) { if (enumerator2.get_Current()) { if (!this.HasActor(enumerator2.get_Current())) { this.SetHudText(Utility.GetBubbleText((uint)this.EnterUniqueId), enumerator2.get_Current()); if (this.TotalTime > 0) { int id = Singleton <CTimerManager> .GetInstance().AddTimer(this.TotalTime, 1, new CTimer.OnTimeUpHandler(this.OnTimeUp), true); this.m_actorTimerMap.Add(new TriggerActionTextBubble.ActorRootInfo { Actor = enumerator2.get_Current(), Id = id }); } } } } return(null); }
public override RefParamOperator TriggerEnter(PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> atker, ITrigger inTrigger, object prm) { List <PoolObjHandle <ActorRoot> > list = new List <PoolObjHandle <ActorRoot> >(); if (base.bSrc && (src != 0)) { list.Add(src); } if (base.bAtker && (atker != 0)) { list.Add(atker); } if ((base.RefObjList != null) && (base.RefObjList.Length > 0)) { foreach (GameObject obj2 in base.RefObjList) { if (obj2 != null) { SpawnPoint componentInChildren = obj2.GetComponentInChildren <SpawnPoint>(); if (componentInChildren != null) { List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = componentInChildren.GetSpawnedList().GetEnumerator(); while (enumerator.MoveNext()) { PoolObjHandle <ActorRoot> current = enumerator.Current; if (current != 0) { list.Add(current); } } } else { PoolObjHandle <ActorRoot> actorRoot = ActorHelper.GetActorRoot(obj2); if (actorRoot != 0) { list.Add(actorRoot); } } } } } List <PoolObjHandle <ActorRoot> > .Enumerator enumerator2 = list.GetEnumerator(); while (enumerator2.MoveNext()) { if ((enumerator2.Current != 0) && !this.HasActor(enumerator2.Current)) { this.SetHudText(Utility.GetBubbleText((uint)base.EnterUniqueId), enumerator2.Current); if (base.TotalTime > 0) { int num2 = Singleton <CTimerManager> .GetInstance().AddTimer(base.TotalTime, 1, new CTimer.OnTimeUpHandler(this.OnTimeUp), true); ActorRootInfo item = new ActorRootInfo { Actor = enumerator2.Current, Id = num2 }; this.m_actorTimerMap.Add(item); } } } return(null); }