private void GoNextGroups() { base.Stop(); if (this.KillCurrentWhenSwitch) { while (this.m_spawnedList.get_Count() > 0) { PoolObjHandle <ActorRoot> poolObjHandle = this.m_spawnedList.get_Item(0); if (poolObjHandle) { poolObjHandle.handle.ActorControl.bSuicide = true; poolObjHandle.handle.ValueComponent.actorHp = 0; if (poolObjHandle) { poolObjHandle.handle.ActorControl.bSuicide = false; this.m_spawnedList.Remove(poolObjHandle); } } } } if (this.NextGroups.Length > 0) { SpawnGroup[] nextGroups = this.NextGroups; for (int i = 0; i < nextGroups.Length; i++) { SpawnGroup spawnGroup = nextGroups[i]; if (spawnGroup != null) { spawnGroup.TriggerStartUp(); } } NextSpawnGroupsParam nextSpawnGroupsParam = new NextSpawnGroupsParam(this, this.NextGroups); Singleton <GameEventSys> .instance.SendEvent <NextSpawnGroupsParam>(GameEventDef.Event_NextSpawnGroups, ref nextSpawnGroupsParam); } }
protected override void DecSpawnPointOver() { base.DecSpawnPointOver(); if (this.m_spawnPointOver == 0) { this.m_bCountingSpawn = true; SGroupDeadEventParam sGroupDeadEventParam = default(SGroupDeadEventParam); sGroupDeadEventParam.sg = this; Singleton <GameEventSys> .get_instance().SendEvent <SGroupDeadEventParam>(GameEventDef.Event_SpawnGroupDead, ref sGroupDeadEventParam); if (this.m_spawnCounter == 0 && this.SpawnTimes > 0) { this.Stop(); SpawnGroup[] nextGroups = this.NextGroups; for (int i = 0; i < nextGroups.Length; i++) { SpawnGroup spawnGroup = nextGroups[i]; if (spawnGroup != null) { spawnGroup.TriggerStartUp(); } } } } }
public override RefParamOperator TriggerEnter(PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> atker, ITrigger inTrigger, object prm) { foreach (GameObject obj2 in base.RefObjList) { if (obj2 != null) { SpawnGroup component = obj2.GetComponent <SpawnGroup>(); if (component != null) { component.TriggerStartUp(); } } } return(null); }
public override RefParamOperator TriggerEnter(PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> atker, ITrigger inTrigger) { GameObject[] refObjList = this.RefObjList; for (int i = 0; i < refObjList.Length; i++) { GameObject gameObject = refObjList[i]; if (!(gameObject == null)) { SpawnGroup component = gameObject.GetComponent <SpawnGroup>(); if (!(component == null)) { component.TriggerStartUp(); } } } return(null); }