public void GameToTitle() { SoundUtil.StopBGM(false); ChangeScene(SceneType.SceneTitle); //DG0-2813 チュートリアル中にエラーでタイトルに戻された場合の対応 if (TutorialManager.IsExists) { TutorialManager.Instance.Destroy(); } }
public void play(string _name, bool _skip, bool _loop, bool _loding = false, bool _clear = true, BGMManager.EBGM_ID _bgm = BGMManager.EBGM_ID.eBGM_INIT, bool _destroy = false) { //BGM停止 SoundUtil.StopBGM(false); m_loop = _loop; UnityUtil.SetObjectEnabledOnce(gameObject, true); if (SafeAreaControl.HasInstance) { SafeAreaControl.Instance.adjustanchoredPosition(m_ImagePanel.GetComponent <RectTransform>()); } m_TitleMovie.m_bPlayMovie = true; m_ScrMedia.DeleteVideoTexture(); m_ScrMedia.Load(_name); m_ScrMedia.Play(); m_ScrMedia.OnEnd += () => { if (m_loop == true) { m_ScrMedia.Play(); } else { finishMovie(); } }; m_ScrMedia.OnVideoError += (MediaPlayerCtrl.MEDIAPLAYER_ERROR errorCode, MediaPlayerCtrl.MEDIAPLAYER_ERROR errorCodeExtra) => { finishMovie(); }; setSkip(_skip); if (_loding == false) { UnityUtil.SetObjectEnabled(m_LodingObject, false); } UnityUtil.SetObjectEnabled(m_PercentObject, false); m_clear = _clear; m_bgmid = _bgm; m_destroy = _destroy; }
WebView _OpenWebView(string url, Action closeAction, uint fixid) { m_CloseAction = closeAction; m_WebViewFixID = fixid; m_WebViewOpen = true; if (BGMManager.HasInstance) { // 再生しているBGMを退避する m_TmpPrevPlayDatas = BGMManager.Instance.GetPlayingBGM(); } SoundUtil.StopBGM(false); #if UNITY_EDITOR_OSX //MacでWebを表示すると固まるのでスキップ _ButtonSetting(); #elif UNITY_IOS || UNITY_ANDROID || UNITY_WP8 // UniWebView: Main Page // http://uniwebview.onevcat.com/reference/class_uni_web_view.html if (m_WebView == null) { m_WebView = gameObject.AddComponent <UniWebView>(); } m_WebView.immersiveMode = false; _ButtonSetting(); m_WebView.OnLoadBegin += OnLoadBeginDelegate; m_WebView.OnLoadComplete += OnLoadComplete; m_WebView.OnReceivedMessage += OnReceivedMessageDelegate; m_WebView.InsetsForScreenOreitation += InsetsForScreenOreitation; m_WebView.OnWebViewShouldClose += OnWebViewShouldClose; UniWebView.SetHomeDomain(GlobalDefine.IN_BROWSER_DOMAIN); List <string> urls = Patcher.Instance.GetInBrowserUrls(); UniWebView.SetInBrowserUrls(string.Join(",", urls.ToArray())); #if UNITY_ANDROID || UNITY_WP8 setSchemes(true); #endif m_WebView.url = url; m_WebView.Load(); #endif return(this); }
protected override void OnDestroy() { //---------------------------------------- // メインメニュー関連情報破棄 //---------------------------------------- MainMenuParam.ParamReset(); //---------------------------------------- // BGM停止 // ver1110でフェードアウトの尺を調整 //---------------------------------------- SoundUtil.StopBGM(false); base.OnDestroy(); }
private void requestSuccessChallengeQuest(ServerApi.ResultData _data) { //---------------------------------------- // 使用したフレンド情報を記憶しておく //---------------------------------------- LocalSaveManager.Instance.SaveFuncUseFriend(MainMenuParam.m_QuestHelper.user_id); // settingQuestStart(_data.GetResult <RecvChallengeQuestStart>().result); //---------------------------------------- // BGM停止処理:暫定対応 //---------------------------------------- SoundUtil.StopBGM(false); //---------------------------------------- // サーバーに受理されたのでゲームへ移行 //---------------------------------------- SoundUtil.PlaySE(SEID.SE_MENU_OK2); SceneCommon.Instance.ChangeScene(SceneType.SceneQuest2, false); }
void OnGoBattle() { DestroyStoryView(); uint unAreaID = GlobalDefine.TUTORIAL_AREA_1; uint unQuestID = GlobalDefine.TUTORIAL_QUEST_1; uint unQuestState = 0; uint unHelperUserID = 0; PacketStructUnit sHelperUnit = null; bool bHelperPointActive = false; int nBeginnerBoostID = 0; uint[] aunareaAmendID = null; Debug.LogError("USER:"******"guest"; friend.user_rank = 999; friend.last_play = friendUnit.get_time; friend.friend_point = 0; friend.friend_state = (uint)FRIEND_STATE.FRIEND_STATE_SUCCESS; SceneGoesParam.Instance.m_SceneGoesParamToQuest2.m_PartyFriend = friend; } ServerDataUtilSend.SendPacketAPI_Quest2StartTutorial( unQuestID, unQuestState, unHelperUserID, sHelperUnit, bHelperPointActive, UserDataAdmin.Instance.m_StructPlayer.unit_party_current, MainMenuParam.m_QuestEventFP, (MainMenuParam.m_BeginnerBoost != null) ? (int)MainMenuParam.m_BeginnerBoost.fix_id : 0, null //aunAreaAmendID ). setSuccessAction( _data => { //---------------------------------------- // サーバーで求めたクエスト開始情報を反映 //---------------------------------------- SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build = new SceneGoesParamToQuest2Build(); SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build.m_QuestBuild = _data.GetResult <RecvQuest2Start>().result.quest; //---------------------------------------- // BGM停止処理:暫定対応 //---------------------------------------- SoundUtil.StopBGM(false); //---------------------------------------- // サーバーに受理されたのでゲームへ移行 //---------------------------------------- SoundUtil.PlaySE(SEID.SE_MENU_OK2); SceneCommon.Instance.ChangeScene(SceneType.SceneQuest2, false); TutorialFSM.Instance.SendFsmNextEvent(); }). setErrorAction( _data => { Debug.LogError("ERROR:" + _data); }). SendStart(); }