private KeyControl ShowUIDetailCheck(UIDutySummary summary) { SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; UIDutyDetailCheck dutyDetail = null; dutyDetail = Util.Instantiate(mPrefabDutyDetailCheck.gameObject, mModalCamera.gameObject).GetComponent <UIDutyDetailCheck>(); dutyDetail.Initialize(summary.GetModel()); dutyDetail.SetDutyDetailCheckClosedCallBack(delegate { dutyDetail.Hide(delegate { _DeteilMode = false; SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; KeyControl keyController = mDutyGrid.GetKeyController(); UnityEngine.Object.Destroy(dutyDetail.gameObject); mModalCamera.Close(); ChangeKeyController(keyController); }); }); return(dutyDetail.Show()); }
private KeyControl ShowUIDutyDetail(UIDutySummary summary) { SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; UIDutyDetail dutyDetail = null; _DeteilMode = true; dutyDetail = Util.Instantiate(mPrefabDutyDetail.gameObject, mModalCamera.gameObject).GetComponent <UIDutyDetail>(); dutyDetail.Initialize(summary.GetModel()); dutyDetail.SetDutyDetailCallBack(delegate(UIDutyDetail.SelectType selectedType) { if (selectedType == UIDutyDetail.SelectType.Positive) { mDutyManager.StartDuty(summary.GetModel().No); UpdateOrderPossibleDutyCount(mDutyManager.MaxExecuteCount - mDutyManager.GetExecutedDutyList().Count, animate: true); DutyModel duty = mDutyManager.GetDuty(summary.GetModel().No); summary.Initialize(summary.GetIndex(), duty); TutorialModel tutorial = mDutyManager.UserInfo.Tutorial; if (tutorial.GetStep() == 0 && !tutorial.GetStepTutorialFlg(1)) { tutorial.SetStepTutorialFlg(1); CommonPopupDialog.Instance.StartPopup("「はじめての任務!」 達成"); SoundUtils.PlaySE(SEFIleInfos.SE_012); } } dutyDetail.Hide(delegate { _DeteilMode = false; SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; KeyControl keyController = mDutyGrid.GetKeyController(); UnityEngine.Object.Destroy(dutyDetail.gameObject); mModalCamera.Close(); ChangeKeyController(keyController); }); }); return(dutyDetail.Show()); }
private void UIDutySummaryEventCallBack(UIDutySummary.SelectType type, UIDutySummary summary) { switch (type) { case UIDutySummary.SelectType.Back: summary.Hover(); ChangeKeyController(mDutyGrid.GetKeyController()); break; case UIDutySummary.SelectType.Action: case UIDutySummary.SelectType.Hover: mDutyGrid.SetKeyController(null); switch (summary.GetModel().State) { case QuestState.WAITING_START: PlaySe(SEFIleInfos.CommonEnter2); if (mDutyManager.GetExecutedDutyList().Count < mDutyManager.MaxExecuteCount) { mModalCamera.Show(); KeyControl keyController = ShowUIDutyDetail(summary); ChangeKeyController(keyController); } else { mModalCamera.Show(); KeyControl keyController = ShowUIDetailCheck(summary); ChangeKeyController(keyController); } break; case QuestState.COMPLETE: { List <DutyModel.InvalidType> invalidTypes = summary.GetModel().GetInvalidTypes(); if (invalidTypes.Count == 0) { PlaySe(SEFIleInfos.SE_012); mModalCamera.Show(); IReward[] rewards = mDutyManager.RecieveRewards(summary.GetModel().No).ToArray(); IEnumerator routine = ReciveReward(rewards); StartCoroutine(routine); TutorialModel tutorial = mDutyManager.UserInfo.Tutorial; if (tutorial.GetStep() == 6 && !tutorial.GetStepTutorialFlg(7)) { tutorial.SetStepTutorialFlg(7); CommonPopupDialog.Instance.StartPopup("「任務完了!」 達成"); SoundUtils.PlaySE(SEFIleInfos.SE_012); } break; } switch (invalidTypes[0]) { case DutyModel.InvalidType.LOCK_TARGET_SLOT: CommonPopupDialog.Instance.StartPopup("該当装備がロックされています"); break; case DutyModel.InvalidType.MAX_SHIP: CommonPopupDialog.Instance.StartPopup("艦が保有上限に達しています"); break; case DutyModel.InvalidType.MAX_SLOT: CommonPopupDialog.Instance.StartPopup("装備が保有上限に達しています"); break; } ChangeKeyController(mDutyGrid.GetKeyController()); break; } case QuestState.RUNNING: { PlaySe(SEFIleInfos.SE_028); mDutyManager.Cancel(summary.GetModel().No); UpdateOrderPossibleDutyCount(mDutyManager.MaxExecuteCount - mDutyManager.GetExecutedDutyList().Count, animate: true); DutyModel duty = mDutyManager.GetDuty(summary.GetModel().No); summary.Initialize(summary.GetIndex(), duty); ChangeKeyController(mDutyGrid.GetKeyController()); break; } } break; case UIDutySummary.SelectType.CallDetail: { _DeteilMode = true; mDutyGrid.SetKeyController(null); mModalCamera.Show(); KeyControl keyController = ShowUIDetailCheck(summary); ChangeKeyController(keyController); break; } } }