/// <summary> /// active npc2 dialog /// </summary> private void ActiveNPC2_Dialog() { LoadNPC2_Texture(); _ConmmonTriggerType = CommonTriggerType.NPC2_Dialog; View_PlayerInfoResponse.Instance.HideET(); dialogUI.SetActive(true); DisplayNextDialog(6); }
/// <summary> /// 激活NPC1对话 /// ***改进:重构(4个参数)*** /// </summary> private void ActiveNPC1_Dialog() { //给NPC1,动态加载贴图 LoadNPC1_Texture(); //赋值当前状态 _CommonTriggerType = CommonTriggerType.NPC1_Dialog; //禁用ET View_PlayerInfoResponse.Instance.HideET(); //显示对话UI面板 goDialogsPanel.gameObject.SetActive(true); //显示首句对话 DisplayNextDialog(NPC1_SECTION_NUM); }
/// <summary> /// 注册用私有方法:利用触发器生成敌人的总管理器 /// </summary> /// <param name="ctt"></param> private void SpawnEnemyMgr(CommonTriggerType ctt) { switch (ctt) { case CommonTriggerType.Enemy1_Spawn: //动态加载,单次控制 if (IsSingleCtrl[0]) { SpawnEnemy_Area_A(); IsSingleCtrl[0] = false; } break; case CommonTriggerType.Enemy2_Spawn: //动态加载,单次控制 if (IsSingleCtrl[1]) { SpawnEnemy_Area_B(); IsSingleCtrl[1] = false; } break; case CommonTriggerType.Enemy3_Spawn: //动态加载,单次控制 if (IsSingleCtrl[2]) { SpawnEnemy_Area_C(); IsSingleCtrl[2] = false; } break; case CommonTriggerType.EnemyBOSS_Spawn: //动态加载,单次控制 if (IsSingleCtrl[3]) { //设置透明墙 SetAirWall(goWalls); //设置背景音乐 AudioManager.PlayBackground(Auc_BOSSBattle); //生成敌人 SpawnEnemy_Area_BOSS(); IsSingleCtrl[2] = false; } break; default: break; } }
/// <summary> /// perpare start dialogs /// </summary> /// <param name="CTT"></param> private void StartDialogPrepare(CommonTriggerType CTT) { switch (CTT) { case CommonTriggerType.None: break; case CommonTriggerType.NPC1_Dialog: ActiveNPC1_Dialog(); break; case CommonTriggerType.NPC2_Dialog: ActiveNPC2_Dialog(); break; default: break; } }
/// <summary> /// 开始对话准备 /// </summary> /// <param name="ctt"></param> private void StartdialogsPrepare(CommonTriggerType ctt) { switch (ctt) { case CommonTriggerType.None: break; case CommonTriggerType.NPC1_Dialog: ActiveNPC1_Dialog(); break; case CommonTriggerType.NPC2_Dialog: ActiveNPC2_Dialog(); break; case CommonTriggerType.NPC3_Dialog: break; default: break; } }