| | |
| | | [SerializeField] Text m_ContentText;
|
| | |
|
| | | [SerializeField] Text m_NextText;
|
| | | [SerializeField] List<int> MysteriousTaskID = new List<int>();//新添神秘任务
|
| | | Dictionary<int, string> PlayerIcon = new Dictionary<int, string>();
|
| | | private int storyMissionsID = 0;//剧情任务ID
|
| | | private int taskCount = 0;//获取对话总条数
|
| | | private int[] sPeaker;//对话对应半身像(0为主角/1为NPC)
|
| | | private int nowTaskNum = 0;//获取当前的任务
|
| | | private int typesPeaker = -1;
|
| | |
|
| | | int[] sPeaker;//对话对应半身像(0为主角/1为NPC)
|
| | | int taskIndex = 0;//获取当前的任务
|
| | | int typesPeaker = -1;
|
| | |
|
| | | public static int storyMissionId = 0;
|
| | |
|
| | | private float timeType = 0f;
|
| | | TaskModel m_TaskModel;
|
| | |
| | | m_NextText.text = string.Format(Language.Get("TaskContinueCount"), AwaitSecond);
|
| | | IsCloseWindow();
|
| | | typesPeaker = -1;
|
| | | storyMissionsID = taskmodel._TaskNow;
|
| | | var config = StoryMissionsConfig.Get(storyMissionsID);
|
| | | var config = StoryMissionsConfig.Get(storyMissionId);
|
| | | if (config.TaskMusic != 0)
|
| | | {
|
| | | SoundPlayer.Instance.PlayNpcAudio(config.TaskMusic);
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (config.NpcID[0] == taskmodel.NPCid)
|
| | | {
|
| | | taskCount = config.TalkNum[0];
|
| | | sPeaker = config.Speaker1;
|
| | | IsMultistage = 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | taskCount = config.TalkNum[0];
|
| | | sPeaker = config.Speaker2;
|
| | | IsMultistage = 1;
|
| | | }
|
| | | //taskCount = config.TalkNum;
|
| | | //sPeaker = config.Speaker;
|
| | | nowTaskNum = 0;
|
| | | ShowDialogSelect(sPeaker[0], nowTaskNum);
|
| | |
|
| | | sPeaker = config.Speaker1;
|
| | |
|
| | | taskIndex = config.TalkNum[0];
|
| | | ShowDialogSelect(sPeaker[0], taskIndex);
|
| | | }
|
| | |
|
| | | private void IsCloseWindow()
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (MysteriousTaskID.Contains(storyMissionsID))
|
| | | {
|
| | | mainModel.MysteriousTaskID = storyMissionsID;
|
| | | CoroutineMgr.Instance.OnMysteriousTask();
|
| | | }
|
| | | bool _bool = IsDungeon();
|
| | | if (_bool)
|
| | | {
|
| | |
| | | private void OnClickMarkRay()
|
| | | {
|
| | | timeType = 0;
|
| | | var config = StoryMissionsConfig.Get(storyMissionsID);
|
| | | var config = StoryMissionsConfig.Get(storyMissionId);
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | nowTaskNum += 1;
|
| | | if (taskCount - 1 >= nowTaskNum)//下一条
|
| | |
|
| | | taskIndex += 1;
|
| | | var end = config.TalkNum.Length > 1 ? config.TalkNum[1] : config.TalkNum[0];
|
| | |
|
| | | if (taskIndex <= end)//下一条
|
| | | {
|
| | | ShowDialogSelect(sPeaker[nowTaskNum], nowTaskNum);
|
| | | ShowDialogSelect(sPeaker[taskIndex], taskIndex);
|
| | | }
|
| | | if (taskCount - 1 < nowTaskNum)//最后一条
|
| | | else//最后一条
|
| | | {
|
| | | SessionEnd(TaskType.OK);
|
| | | Close();
|
| | |
| | | }
|
| | | private void OnClickSKIPButton()
|
| | | {
|
| | | var config = StoryMissionsConfig.Get(storyMissionsID);
|
| | | var config = StoryMissionsConfig.Get(storyMissionId);
|
| | | if (config != null)
|
| | | {
|
| | | SessionEnd(TaskType.OK);
|
| | |
| | |
|
| | | m_PlayerNameText.text = PlayerDatas.Instance.baseData.PlayerName;
|
| | |
|
| | | string platercContentKey = StoryMissionsConfig.Get(storyMissionsID).content[IsMultistage];
|
| | | string platercContentKey = StoryMissionsConfig.Get(storyMissionId).content;
|
| | | var config = TASKINFOConfig.Get(string.Format(platercContentKey, stepNum));
|
| | | if (config != null)
|
| | | {
|
| | |
| | | m_BaseboardImageNPC.SetActive(true);
|
| | | m_BaseboardImagePlayer.SetActive(false);
|
| | | }
|
| | | var configStoryMissions = StoryMissionsConfig.Get(storyMissionsID);
|
| | | var configStoryMissions = StoryMissionsConfig.Get(storyMissionId);
|
| | | if (configStoryMissions == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | int npcId = configStoryMissions.NpcID[IsMultistage];
|
| | | int npcId = configStoryMissions.NpcID;
|
| | | var npcConfig = NPCConfig.Get(npcId);
|
| | | m_NPCNameText.text = npcConfig.charName;
|
| | | string npcContentKey = configStoryMissions.content[IsMultistage];
|
| | | string npcContentKey = configStoryMissions.content;
|
| | | var taskInfo = TASKINFOConfig.Get(string.Format(npcContentKey, stepNum));
|
| | | if (taskInfo == null)
|
| | | {
|
| | |
| | | {
|
| | | m_ContentText_Npc.text = taskInfo.show_writing;
|
| | | }
|
| | |
|
| | | string npcIcon = configStoryMissions.NpcIcon[IsMultistage];
|
| | |
|
| | | |
| | | var data = new UI3DNPCExhibitionData()
|
| | | {
|
| | | npcId = npcId,
|