private void Start() { FuncRegion[] componentsInChildren = base.GetComponentsInChildren <FuncRegion>(true); for (int i = 0; i < componentsInChildren.Length; i++) { FuncRegion funcRegion = componentsInChildren[i]; if (!(funcRegion == null)) { if (funcRegion.enabled && funcRegion.gameObject.activeInHierarchy && funcRegion.gameObject.activeSelf) { if (funcRegion is ReviveRegion) { this.reviveAreas.Add(funcRegion as ReviveRegion); } else if (funcRegion is SoldierRegion) { this.soldierAreas.Add(funcRegion as SoldierRegion); } else if (funcRegion is CommonSpawnGroup) { this.commonSpawnGroups.Add(funcRegion as CommonSpawnGroup); } else if (funcRegion is SpawnGroup) { this.spawnGroups.Add(funcRegion as SpawnGroup); } else if (funcRegion is WaypointsHolder) { this.waypointsList.Add(funcRegion as WaypointsHolder); } else if (funcRegion is AreaEventTrigger) { AreaEventTrigger areaEventTrigger = funcRegion as AreaEventTrigger; this.triggerList.Add(areaEventTrigger); GameObject gameObject = funcRegion.gameObject; ListView <AreaEventTrigger> listView = null; for (int j = this.objTriggerMultiMap.get_Count() - 1; j >= 0; j--) { MapWrapper.ObjTriggerKeyValuePair objTriggerKeyValuePair = this.objTriggerMultiMap.get_Item(j); if (objTriggerKeyValuePair.obj == gameObject) { listView = objTriggerKeyValuePair.triggers; break; } } if (listView == null) { listView = new ListView <AreaEventTrigger>(); this.objTriggerMultiMap.Add(new MapWrapper.ObjTriggerKeyValuePair { obj = gameObject, triggers = listView }); } listView.Add(areaEventTrigger); } else if (funcRegion is DynamicChannel) { this.channelList.Add(funcRegion as DynamicChannel); } } } } this.TrueMen = new List <PoolObjHandle <ActorRoot> >(Singleton <GameObjMgr> .GetInstance().SoldierActors); }
public override RefParamOperator TriggerEnter(PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> atker, ITrigger inTrigger) { GameObject[] refObjList = this.RefObjList; if (refObjList != null && refObjList.Length > 0) { GameObject[] array = refObjList; for (int i = 0; i < array.Length; i++) { GameObject gameObject = array[i]; if (!(gameObject == null)) { gameObject.CustomSetActive(this.bEnable); FuncRegion component = gameObject.GetComponent <FuncRegion>(); if (component != null) { if (this.bEnable) { component.Startup(); } else { component.Stop(); } } } } } if (this.bSrc && src) { src.get_handle().gameObject.CustomSetActive(this.bEnable); FuncRegion component2 = src.get_handle().gameObject.GetComponent <FuncRegion>(); if (component2 != null) { if (this.bEnable) { component2.Startup(); } else { component2.Stop(); } } } if (this.bAtker && atker) { atker.get_handle().gameObject.CustomSetActive(this.bEnable); FuncRegion component3 = atker.get_handle().gameObject.GetComponent <FuncRegion>(); if (component3 != null) { if (this.bEnable) { component3.Startup(); } else { component3.Stop(); } } } return(null); }