void doit() { for (int i = 0; i < transform.childCount; i++) { TriggerHanldePoint hd = transform.GetChild(i).GetComponent <TriggerHanldePoint>(); if (hd != null) { hd.onTriggerHanlde(); } } }
private void doit() { for (int i = 0; i < base.transform.childCount; i++) { TriggerHanldePoint component = base.transform.GetChild(i).GetComponent <TriggerHanldePoint>(); bool flag = component != null; if (flag) { component.onTriggerHanlde(); } } }
public virtual void onTriggerHanlde() { bool flag = this.type == 1; if (flag) { bool flag2 = this.paramInts.Count == 0; if (!flag2) { MonsterMgr._inst.AddMonster(this.paramInts[0], base.transform.position, 0u, base.transform.localEulerAngles.y, 0, 0, null); } } else { bool flag3 = this.type == 2; if (flag3) { bool flag4 = this.paramGo.Count == 0; if (!flag4) { foreach (GameObject current in this.paramGo) { current.SetActive(true); } } } else { bool flag5 = this.type == 3; if (flag5) { bool flag6 = this.paramGo.Count == 0; if (!flag6) { foreach (GameObject current2 in this.paramGo) { HiddenItem component = current2.GetComponent <HiddenItem>(); bool flag7 = component != null; if (flag7) { component.hide(); } else { current2.SetActive(false); } } } } else { bool flag8 = this.type == 4; if (flag8) { bool flag9 = this.paramInts.Count == 0; if (!flag9) { int num = 0; for (int i = 0; i < this.paramInts.Count; i++) { num += NavmeshUtils.listARE[this.paramInts[i]]; } bool flag10 = num == 0; if (!flag10) { SelfRole._inst.setNavLay(num); } } } else { bool flag11 = this.type == 5; if (flag11) { bool flag12 = this.paramGo.Count == 0; if (!flag12) { Transform transform = this.paramGo[0].transform; for (int j = 0; j < transform.childCount; j++) { GameObject gameObject = transform.GetChild(j).gameObject; gameObject.AddComponent <BrokenIten>(); } } } else { bool flag13 = this.type == 6; if (flag13) { bool flag14 = this.paramGo.Count == 0; if (!flag14) { bool flag15 = this.paramFloat.Count == 0; if (!flag15) { bool flag16 = this.paramBool; if (flag16) { InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_HIDE_ALL); joystick.instance.stopDrag(); } this.paramGo[1].SetActive(true); SceneCamera.changeAniCamera(this.paramGo[0], this.paramFloat[0]); } } } else { bool flag17 = this.type == 8; if (flag17) { bool flag18 = this.paramGo.Count == 0; if (!flag18) { this.paramGo[0].SetActive(true); HiddenItem component2 = this.paramGo[0].GetComponent <HiddenItem>(); bool flag19 = component2 != null; if (flag19) { component2.hide(); } else { this.paramGo[0].SetActive(false); } } } else { bool flag20 = this.type == 9; if (flag20) { bool flag21 = this.paramFloat.Count < 2; if (!flag21) { bool flag22 = this.paramInts.Count < 1; if (!flag22) { SceneCamera.cameraShake(this.paramFloat[0], this.paramInts[0], this.paramFloat[1]); } } } else { bool flag23 = this.type == 10; if (flag23) { bool flag24 = this.paramFloat.Count < 1; if (!flag24) { bool flag25 = this.paramGo.Count < 1; if (!flag25) { GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.paramGo[0]); gameObject2.transform.SetParent(SelfRole._inst.m_curModel, false); UnityEngine.Object.Destroy(gameObject2, this.paramFloat[0]); } } } else { bool flag26 = this.type == 11; if (flag26) { bool flag27 = this.paramStr.Count < 1; if (!flag27) { List <string> ldialog = this.paramStr; NpcRole npc = null; bool flag28 = this.paramGo != null && this.paramGo.Count > 0 && this.paramGo[0] != null; if (flag28) { npc = this.paramGo[0].GetComponent <NpcRole>(); } DoAfterMgr.instacne.addAfterRender(delegate { dialog.showTalk(ldialog, null, npc, false); }); } } else { bool flag29 = this.type == 12; if (flag29) { bool flag30 = this.paramStr.Count < 1; if (!flag30) { bool flag31 = this.paramGo == null || this.paramGo.Count == 0 || this.paramGo[0] == null; if (flag31) { SelfRole._inst.m_curAni.SetTrigger(this.paramStr[0]); } else { Animator component3 = this.paramGo[0].GetComponent <Animator>(); bool flag32 = component3 != null; if (flag32) { component3.SetTrigger(this.paramStr[0]); } } } } else { bool flag33 = this.type == 13; if (flag33) { bool flag34 = this.paramStr.Count < 1; if (!flag34) { NewbieTeachMgr.getInstance().add(this.paramStr, -1); } } else { bool flag35 = this.type == 14; if (flag35) { bool flag36 = !this.paramBool; if (flag36) { InterfaceMgr.getInstance().floatUI.transform.localScale = Vector3.zero; bool flag37 = joystick.instance != null; if (flag37) { joystick.instance.OnDragOut(null); } } else { InterfaceMgr.getInstance().floatUI.transform.localScale = Vector3.one; } } else { bool flag38 = this.type == 15; if (flag38) { TriggerHanldePoint.lGo = this.paramGo; } else { bool flag39 = this.type == 16; if (flag39) { bool flag40 = this.paramGo.Count == 0; if (!flag40) { foreach (GameObject current3 in this.paramGo) { TriggerHanldePoint component4 = current3.GetComponent <TriggerHanldePoint>(); bool flag41 = component4 != null; if (flag41) { component4.onTriggerHanlde(); } } } } else { bool flag42 = this.type == 17; if (flag42) { bool flag43 = maploading.instance != null; if (flag43) { maploading.instance.closeLoadWait(0.5f); } } } } } } } } } } } } } } } } } }
private bool onTrigger() { //if (type == 0)//切地图 //{ // SelfRole._inst.canMove = false; // SelfRole._inst.StopMove(); // loading_cloud.showhandle = changemap; // InterfaceMgr.getInstance().open(InterfaceMgr.LOADING_CLOUD); //} //else if(type==1)//显示隐藏物件 //{ // int idx = 0; // foreach (GameObject go in paramGameobjects) // { // if (idx % 2 == 0) // { // if (go != null) // go.SetActive(true); // } // else // { // if (go != null) // go.SetActive(false); // } // idx++; // } //} //else if (type == 2)//触发 if (type == 0) { for (int i = 0; i < transform.childCount; i++) { TriggerHanldePoint hd = transform.GetChild(i).GetComponent <TriggerHanldePoint>(); if (hd != null) { hd.onTriggerHanlde(); } } return(true); //foreach (GameObject go in paramGameobjects) //{ // TriggerHanldePoint hd = go.GetComponent<TriggerHanldePoint>(); // if (hd != null) // hd.onTriggerHanlde(); //} } else if (type == 1)//svr地图跳转 { if (paramInts.Count == 0) { return(true); } Variant v = SvrMapConfig.instance.getSingleMapConf((uint)paramInts[0]); if (v.ContainsKey("lv_up") && v["lv_up"] > PlayerModel.getInstance().up_lvl) { flytxt.instance.fly(ContMgr.getCont("comm_nolvmap", v["lv_up"], v["lv"]), v["map_name"]); return(false); } if (v.ContainsKey("lv") && v["lv"] > PlayerModel.getInstance().lvl) { flytxt.instance.fly(ContMgr.getCont("comm_nolvmap", v["lv_up"], v["lv"]), v["map_name"]); return(false); } loading_cloud.showIt(() => { MapProxy.getInstance().sendBeginChangeMap(paramInts[0]); }); return(true); } return(true); }
private bool onTrigger() { bool flag = this.type == 0; bool result; if (flag) { for (int i = 0; i < base.transform.childCount; i++) { TriggerHanldePoint component = base.transform.GetChild(i).GetComponent <TriggerHanldePoint>(); bool flag2 = component != null; if (flag2) { component.onTriggerHanlde(); } } result = true; } else { bool flag3 = this.type == 1; if (flag3) { bool flag4 = this.paramInts.Count == 0; if (flag4) { result = true; } else { Variant singleMapConf = SvrMapConfig.instance.getSingleMapConf((uint)this.paramInts[0]); bool flag5 = singleMapConf.ContainsKey("lv_up") && singleMapConf["lv_up"] > ModelBase <PlayerModel> .getInstance().up_lvl; if (flag5) { flytxt.instance.fly(ContMgr.getCont("comm_nolvmap", new string[] { singleMapConf["lv_up"], singleMapConf["lv"] }), singleMapConf["map_name"], default(Color), null); result = false; } else { bool flag6 = singleMapConf.ContainsKey("lv") && singleMapConf["lv"] > ModelBase <PlayerModel> .getInstance().lvl; if (flag6) { flytxt.instance.fly(ContMgr.getCont("comm_nolvmap", new string[] { singleMapConf["lv_up"], singleMapConf["lv"] }), singleMapConf["map_name"], default(Color), null); result = false; } else { loading_cloud.showIt(delegate { BaseProxy <MapProxy> .getInstance().sendBeginChangeMap(this.paramInts[0], false, false); }); result = true; } } } } else { result = true; } } return(result); }
virtual public void onTriggerHanlde() { // MonsterMgr._inst.AddMonster(transform); if (type == 1) { if (paramInts.Count == 0) { return; } MonsterMgr._inst.AddMonster(paramInts[0], transform.position, 0, transform.localEulerAngles.y); } else if (type == 2)//enable { if (paramGo.Count == 0) { return; } foreach (GameObject go in paramGo) { go.SetActive(true); } } else if (type == 3)//unenable { if (paramGo.Count == 0) { return; } foreach (GameObject go in paramGo) { HiddenItem hideitem = go.GetComponent <HiddenItem>(); if (hideitem != null) { hideitem.hide(); } else { go.SetActive(false); } } } else if (type == 4)//nav { if (paramInts.Count == 0) { return; } int idx = 0; for (int i = 0; i < paramInts.Count; i++) { idx += NavmeshUtils.listARE[paramInts[i]]; } if (idx == 0) { return; } SelfRole._inst.setNavLay(idx); } else if (type == 5) { if (paramGo.Count == 0) { return; } Transform con = paramGo[0].transform; for (int i = 0; i < con.childCount; i++) { GameObject tempgi = con.GetChild(i).gameObject; tempgi.AddComponent <BrokenIten>(); } } else if (type == 6) { if (paramGo.Count == 0) { return; } if (paramFloat.Count == 0) { return; } if (paramBool) { InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_HIDE_ALL); a1_gamejoy.inst_joystick.stopDrag(); } paramGo[1].SetActive(true); SceneCamera.changeAniCamera(paramGo[0], paramFloat[0]); } else if (type == 8) { if (paramGo.Count == 0) { return; } paramGo[0].SetActive(true); HiddenItem hideitem = paramGo[0].GetComponent <HiddenItem>(); if (hideitem != null) { hideitem.hide(); } else { paramGo[0].SetActive(false); } } else if (type == 9) { if (paramFloat.Count < 2) { return; } if (paramInts.Count < 1) { return; } SceneCamera.cameraShake(paramFloat[0], paramInts[0], paramFloat[1]); } else if (type == 10)//eff { if (paramFloat.Count < 1) { return; } if (paramGo.Count < 1) { return; } GameObject tempGo = GameObject.Instantiate(paramGo[0]) as GameObject; tempGo.transform.SetParent(SelfRole._inst.m_curModel, false); Destroy(tempGo, paramFloat[0]); } else if (type == 11)//dialog { if (dialogid <= 0) { return; } SXML ncpxml = XMLMgr.instance.GetSXML("dialog"); SXML xml = ncpxml.GetNode("dialog", "id==" + dialogid); List <string> lstr = new List <string>(); if (xml != null) { List <SXML> l = new List <SXML>(); l = xml.GetNodeList("log"); foreach (SXML s in l) { lstr.Add(s.getString("value")); } } List <string> ldialog = lstr; NpcRole npc = null; if (paramGo != null && paramGo.Count > 0 && paramGo[0] != null) { npc = paramGo[0].GetComponent <NpcRole>(); } DoAfterMgr.instacne.addAfterRender(() => { dialog.showTalk(ldialog, null, npc); }); } else if (type == 12)//act { if (paramStr.Count < 1) { return; } if (paramGo == null || paramGo.Count == 0 || paramGo[0] == null) { SelfRole._inst.m_curAni.SetTrigger(paramStr[0]); } else { Animator anim = paramGo[0].GetComponent <Animator>(); if (anim != null) { anim.SetTrigger(paramStr[0]); } } } else if (type == 13)//newbiecode { if (waitCodesid == 0) { return; } NewbieTeachMgr.getInstance().add(1, waitCodesid, -1); } else if (type == 14)//floatui { if (!paramBool) { //InterfaceMgr.getInstance().floatUI.transform.localScale = Vector3.zero; InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_STORY); if (a1_gamejoy.inst_joystick != null) { a1_gamejoy.inst_joystick.OnDragOut(); } } else { InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL); //InterfaceMgr.getInstance().floatUI.transform.localScale = Vector3.one; } } else if (type == 15)//gos { lGo = paramGo; } else if (type == 16)//group { if (paramGo.Count == 0) { return; } foreach (GameObject go in paramGo) { TriggerHanldePoint tri = go.GetComponent <TriggerHanldePoint>(); if (tri != null) { tri.onTriggerHanlde(); } } } else if (type == 17) { //延迟0.5秒关闭loading界面。解决avatar一闪和一些初始化的东西卡住的问题 if (maploading.instance != null) { maploading.instance.closeLoadWait(0.5f); } } }