protected virtual void SetupTopMenu(Camera _camera) { m_Camera = _camera; Canvas[] canvasList = gameObject.GetComponentsInChildren <Canvas>(); for (int i = 0; i < canvasList.Length; i++) { canvasList[i].worldCamera = m_Camera; } GlobalTopMenu _topMenu = gameObject.GetComponentInChildren <GlobalTopMenu>(); m_SeqArray[(int)GLOBALMENU_SEQ.TOP_MENU].m_MenuSeq = _topMenu; _topMenu.ForceActive(); _topMenu.UpdateCount = 5; m_CurrentSeq = GLOBALMENU_SEQ.TOP_MENU; StartCoroutine(UnityUtil.DelayFrameAction(1, () => { setPanelSize(GLOBALMENU_SEQ.TOP_MENU); })); GlobalMenuManager.Instance.m_GlobalMenu = this; }
/// <summary> /// GloabalMainMenuSeqのページ切り替え時に表示する機能チュートリアルの種類を取得する /// </summary> public static TutorialDialog.FLAG_TYPE ConvertToTutorialFlagType(this GLOBALMENU_SEQ seq) { TutorialDialog.FLAG_TYPE flagType; switch (seq) { //case GLOBALMENU_SEQ.NONE: // break; //case GLOBALMENU_SEQ.TOP_MENU: // break; //case GLOBALMENU_SEQ.OPTION: // break; case GLOBALMENU_SEQ.MISSION: flagType = TutorialDialog.FLAG_TYPE.ACHIEVEMENT_GP_LIST; break; //case GLOBALMENU_SEQ.PRESENT: // break; //case GLOBALMENU_SEQ.ITEM: // break; case GLOBALMENU_SEQ.EVENTSCHEDULE: flagType = TutorialDialog.FLAG_TYPE.EVENT_SCHEDULE_LIST; break; //case GLOBALMENU_SEQ.MAX: // break; default: flagType = TutorialDialog.FLAG_TYPE.NONE; break; } return(flagType); }
/// <summary> /// ページを指定してグローバルメニューを開く /// </summary> /// <param name="type"></param> public void OpenGlobalMenu(GLOBALMENU_SEQ seq) { if (m_menuButtonModel.isEnabled == false) { return; } OnOpenGlobalMenu(seq); }
public void setPanelSize(GLOBALMENU_SEQ _seq) { if (_seq == GLOBALMENU_SEQ.TOP_MENU) { m_Context.IsActiveTopMenu = true; } else { m_Context.IsActiveTopMenu = false; m_Panel.SetPositionAjustStatusBar(new Vector2(-8, -106), new Vector2(-16, -226)); } }
/// <summary> /// グローバルメニュー開く /// </summary> public void OnOpenGlobalMenu(GLOBALMENU_SEQ _seq = GLOBALMENU_SEQ.TOP_MENU) { if (!CheckSwitchRequest()) { return; } SoundUtil.PlaySE(SEID.SE_MENU_OK); var tag = "HeaderOpenGlobalMenu"; ButtonBlocker.Instance.Block(tag); if (globalMenu == null) { globalMenu = GlobalMenu.Create(GLOBALMENU_TYPE.MAIN_MENU, SceneObjReferMainMenu.Instance.m_MainMenuGroupCamera.GetComponent <Camera>()); if (_seq == GLOBALMENU_SEQ.TOP_MENU) { globalMenu.Show(() => { ButtonBlocker.Instance.Unblock(tag); }); } else { globalMenu.ShowPage(_seq, () => { ButtonBlocker.Instance.Unblock(tag); }); } if (MainMenuManager.HasInstance) { MainMenuManager.Instance.SetMenuFooterActive(false); } } else { globalMenu.Hide(() => { ButtonBlocker.Instance.Unblock(tag); }); globalMenu = null; if (MainMenuManager.HasInstance) { MainMenuManager.Instance.SetMenuFooterActive(true); } } }
public void ShowPage(GLOBALMENU_SEQ _seq, System.Action callback = null) { gameObject.GetComponentInChildren <Canvas>().enabled = true; GlobalMenuManagerFSM.Instance.SendFsmEvent("SHOW_PAGE"); setPanelSize(_seq); PlayAnimation(AppearPageAnimationName, () => { if (callback != null) { callback(); } PageSwitch(_seq); m_isShowed = true; }); }
public override void PageUpdateStatusFromMainMenu(GLOBALMENU_SEQ seq) { #if BUILD_TYPE_DEBUG Debug.Log("MainMenuUnitPartySelect UpdateUserStatusFromGlobalMenu:" + seq); #endif //[DG0-2521] 【5.0.1対応】ユニット編成画面でミッションから「パーティ枠拡張」を受け取った後に特定操作を行うと、Odinエラーの後に進行不能となる switch (seq) { case GLOBALMENU_SEQ.MISSION: if (m_PartyAssignLength != UserDataAdmin.Instance.m_StructPartyAssign.Length) { m_IsRequestedApi = true; MainMenuManager.Instance.AddSwitchRequest(MAINMENU_SEQ.SEQ_UNIT_PARTY_SELECT, false, false); } break; case GLOBALMENU_SEQ.TITLE: m_UnitPartyCurrent = DefaultUnitPartyCurrent; break; } }
public void PageSwitchEnd() { m_LastSeq = m_CurrentSeq; m_CurrentSeq = m_NextSeq; m_NextSeq = GLOBALMENU_SEQ.NONE; }
public void PageSwitch(GLOBALMENU_SEQ _seq, bool bBack = false) { if (m_NextSeq != GLOBALMENU_SEQ.NONE) { return; } SeqData _seqData = m_SeqArray[(int)_seq]; if (_seqData.m_MenuSeq == null) { //オブジェクト生成 GameObject _tmp = Resources.Load("Prefab/GlobalMenu/GlobalMenuSeq") as GameObject; if (_tmp == null) { return; } GameObject _pageObj = Instantiate(_tmp) as GameObject; if (_pageObj == null) { return; } _pageObj.transform.SetParent(m_UIRoot.transform, false); foreach (MasterGlobalMenuSeq.SequenceObj _obj in _seqData.m_Master.SequenceObjArray) { if (_obj.gameObj == null) { string object_path = "Prefab/" + _obj.object_name; GameObject originObj = Resources.Load(object_path) as GameObject; if (originObj != null) { _obj.gameObj = Instantiate(originObj) as GameObject; _obj.gameObj.transform.SetParent(_pageObj.transform, false); } } } //クラス生成 m_SeqArray[(int)_seq].m_MenuSeq = _pageObj.AddComponent(Type.GetType(_seqData.m_Master.SequenceName)) as GlobalMenuSeq; if (m_SeqArray[(int)_seq].m_MenuSeq == null) { DestroyObject(_pageObj); return; } //名前変更 _pageObj.name = m_SeqArray[(int)_seq].m_Master.SequenceName; //-------------------------------- // 初期化中のレイアウトを見られたくないので // 一時的に表示しないレイヤーに設定する //-------------------------------- //UnityUtil.SetObjectLayer( _pageObj , LayerMask.NameToLayer( "DRAW_CLIP" ) ); UnityUtil.SetObjectEnabledOnce(_pageObj, true); if (_seq != GLOBALMENU_SEQ.TOP_MENU) { _seqData.m_MenuSeq.RegisterOnFadeOutFinishedCallback(() => { Destroy(_pageObj); }); } } m_NextSeq = _seq; m_Back = bBack; GlobalMenuManagerFSM.Instance.SendFsmEvent("SWITCH_PAGE"); }
/// <summary> /// 基底継承:GlobalMenuSeq:ページ無効化直後に走るイベント /// <para>処理中を返す間中はページを次のページが移行せずに処理を続ける</para> /// </summary> /// <param name="eNextGlobalMenuSeq"></param> /// <returns>[ true:処理中 / false:処理完遂 ]</returns> public virtual bool PageSwitchEventDisableAfter(GLOBALMENU_SEQ eNextGlobalMenuSeq) { return(false); }
public virtual void PageUpdateStatusFromMainMenu(GLOBALMENU_SEQ seq) { #if BUILD_TYPE_DEBUG Debug.Log("MainMenuSeq UpdateUserStatusFromGlobalMenu:" + seq); #endif }