private void OnDestroy() { SingletonMonoBehaviour <TutorialGuideManager> .instance = null; tutorialDialog = null; req = null; model = null; }
private IEnumerator LoadTutorial(TutorialModel model, TutorialID ID, Action OnLoaded) { KeyControl key = null; if (SingletonMonoBehaviour <UIShortCutMenu> .exist()) { SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : true); key = App.OnlyController; App.OnlyController = new KeyControl(); } req = Resources.LoadAsync("Prefabs/TutorialGuide/TutorialDialog_" + ID.ToString()); yield return(req); tutorialDialog = null; tutorialDialog = Util.Instantiate(req.asset).GetComponent <TutorialDialog>(); tutorialDialog.SetTutorialId(ID); model.SetKeyTutorialFlg((int)ID); tutorialDialog.SetOnLoaded(OnLoaded); req = null; if (SingletonMonoBehaviour <UIShortCutMenu> .exist()) { SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : false); App.OnlyController = key; } }
public SurvivalGameplayScene() : base("survival-gameplay") { StatusDisplay = new SurvivalDataDisplay(); _readyPopup = new PopupRequiringDismissal() { ID = "get-ready-popup" }; _pauseButton = new PauseButton(); _pauseDialog = new PauseDialog(); _noLivesDialog = new NoLivesDialog(); _tutorialDialog = new TutorialDialog(); _tutorialRunner = new TutorialRunner(); _rankingCoordinator = new SurvivalRankingCoordinator(CloseCurrentLevel, RegisterGameObject); _pauseDialog.InputSources.Add(_inputProcessor); _pauseDialog.ExitCallback = HandleDialogClose; _noLivesDialog.InputSources.Add(_inputProcessor); _noLivesDialog.ExitCallback = HandleDialogClose; _tutorialDialog.InputSources.Add(_inputProcessor); _tutorialDialog.ExitCallback = HandleDialogClose; _playerEventPopup.AnimationCompletionHandler = HandlePlayerEventAnimationComplete; }
////////////////////////////////////////////////////////////////////////////////// //CutScene public void ShowCutScene(eSceneType type) { if (Network.BattleStageInfo == null || Network.BattleStageInfo.Difficulty == pe_Difficulty.Hard) { return; } if (CutsceneInfo != null) { CurrentMenu = GameMenu.Battle; // 삭제하면 튜토 1-3에서 클릭안되는 버그생김 if (CutsceneInfo.CutSceneInfo.SceneType == type && CutsceneInfo.Targets.Count > 0) { TimeManager.Instance.SetPause(true); bShowed = true; TutorialDialog obj = NGUITools.AddChild(contents.gameObject, DialogPrefab).GetComponent <TutorialDialog>(); obj.Init(CutsceneInfo.Targets[0]); CutsceneInfo.Targets.RemoveAt(0); m_Prefabs.Add(obj.gameObject); gameObject.SetActive(true); return; } else { CutsceneInfo = null; } return; } if ((type == eSceneType.PreAll || type == eSceneType.PreAll_Wave3) && CheckBattleStart() == true) { SetConditionOK(); } }
/// <summary> /// チュートリアルダイアログを表示 /// </summary> private void showTutorialDialog(int dialog_index) { m_IsShowingTutorialDialog = true; TutorialDialog.FLAG_TYPE flag_type = TutorialDialog.FLAG_TYPE.BATTLE; switch (dialog_index) { case 1: flag_type = TutorialDialog.FLAG_TYPE.BATTLE1; break; case 2: flag_type = TutorialDialog.FLAG_TYPE.BATTLE2; break; case 3: flag_type = TutorialDialog.FLAG_TYPE.BATTLE3; break; case 4: flag_type = TutorialDialog.FLAG_TYPE.BATTLE4; break; } TutorialDialog.Create() .SetTutorialType(flag_type) .Show(() => { m_IsNextCommand = true; m_IsShowingTutorialDialog = false; } ); }
public void SetUp() { UITester.Init(typeof(Utils.Net.Sample.App)); UITester.Dispatcher.Invoke(() => { testTutorialDialog = new TutorialDialog(new Managers.TutorialManager(), "Title", "Text") { PreviousButtonText = "Previous", NextButtonText = "Next", IsCloseButtonVisible = true, IsCheckboxVisible = true }; var window = new Window() { Content = testTutorialDialog, ResizeMode = ResizeMode.NoResize, SizeToContent = SizeToContent.WidthAndHeight, Width = 300, WindowStartupLocation = WindowStartupLocation.CenterOwner, WindowStyle = WindowStyle.SingleBorderWindow, ShowInTaskbar = false, }; window.Show(); }); }
public void OnClick() { TutorialDialog dialog = TutorialDialog.Create(); dialog.SetTutorialType(TutorialDialog.FLAG_TYPE.UNIT_PARTY_SELECT); dialog.Show(() => { Debug.Log("TutorialCarousel Completed"); }); }
private void SetDialogTarget(TargetInfo info) { Debug.LogFormat("SetDialogTarget", info.Desc); CurrentDialogTarget = info; TutorialDialog obj = NGUITools.AddChild(contents.gameObject, DialogPrefab).GetComponent <TutorialDialog>(); obj.Init(info); m_Prefabs.Add(obj.gameObject); }
public static TutorialDialog[] GetCarousel() { GameObject[] carouselArray = GameObject.FindGameObjectsWithTag("TutorialDialog"); TutorialDialog[] _ret = new TutorialDialog[carouselArray.Length]; for (int i = 0; i < carouselArray.Length; i++) { _ret[i] = carouselArray[i].GetComponent <TutorialDialog>(); } return(_ret); }
protected override void OnStart() { base.OnStart(); Android.Content.Context ctx = this; if (_firstStart) { CheckAndRequestAppReview(); TutorialDialog.ShowTutorial(this, TutorialPart.MainActivity, new TutorialPage[] { new TutorialPage() { imageResourceId = Resource.Drawable.tutorial_compass_calibration, textResourceId = Resource.String.Tutorial_Main_CompassCalibration }, new TutorialPage() { imageResourceId = Resource.Drawable.tutorial_heading_correction, textResourceId = Resource.String.Tutorial_Main_HeadingCorrection }, new TutorialPage() { imageResourceId = Resource.Drawable.tutorial_horizont_correction_simple, textResourceId = Resource.String.Tutorial_Main_HorizontCorrection }, new TutorialPage() { imageResourceId = Resource.Drawable.tutorial_show_poi_data, textResourceId = Resource.String.Tutorial_Main_ShowPoiData }, new TutorialPage() { imageResourceId = Resource.Drawable.tutorial_ar_warning, textResourceId = Resource.String.Tutorial_Main_ARWarning }, }, () => { _firstStart = false; if (!Context.Database.IsAnyDownloadedPois()) { AlertDialog.Builder alert = new AlertDialog.Builder(this).SetCancelable(false); alert.SetPositiveButton(Resources.GetText(Resource.String.Common_Yes), (senderAlert, args) => { Intent downloadActivityIntent = new Intent(ctx, typeof(DownloadActivity)); StartActivity(downloadActivityIntent); //_adapter.NotifyDataSetChanged(); }); alert.SetNegativeButton(Resources.GetText(Resource.String.Common_No), (senderAlert, args) => { }); alert.SetMessage(Resources.GetText(Resource.String.Main_DownloadDataQuestion)); var answer = alert.Show(); } ElevationProfileProvider.Instance().CheckAndReloadElevationProfile(this, MaxDistance, Context); }); } }
public void ShowBorderTest() { // for code coverage UITester.Dispatcher.Invoke(() => { var popup = TutorialDialog.ShowBorder(UITester.MainWindow, Colors.Red, new Thickness(3)); Assert.IsInstanceOfType(popup, typeof(Popup)); Assert.IsTrue(popup.IsOpen); popup.IsOpen = false; }); }
void OpenTutorialDialog(int idx) { if (index == idx && !isOpened) { TutorialDialog.PopUp(new TutorialParam() { target = gameObject, needIncrease = needIncreaseSeq, auto = needAuto, dir = direction }); isOpened = true; } }
public void ShowPopupTest() { // for code coverage UITester.Dispatcher.Invoke(() => { var popup = TutorialDialog.ShowPopup(testTutorialDialog.Manager, "Title", "Text", PlacementMode.Center, UITester.MainWindow); Assert.IsInstanceOfType(popup, typeof(Popup)); Assert.IsTrue(popup.IsOpen); popup.IsOpen = false; }); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } }
public void OnClick() { int level = WeaponDB.Instance.GetWeaponLvById((int)weaponType); if (level == 0) { return; } if (!selected && IsCloseWeapon && dlg != null && dlg.HasCloseWeaponSelected()) // 只能选择一把近战武器 { return; } if (!selected && dlg.SelectedGunWeaponCount() >= 4 && !IsCloseWeapon) { return; } // if (!selected && GameData.Instance.selectedWeapons.Count == 0 && !IsCloseWeapon) return; selected = !selected; if (GetComponentInParent <TutorialDialog>() != null) { Debug.Log("??????????????"); TutorialDialog td = GetComponentInParent <TutorialDialog>(); parent = td.Param.target.GetComponent <WeaponSelectionItem>(); parent.OnClick(); return; } if (parent != null) { parent.selected = selected; } if (dlg != null) { dlg.OnSelectedWeaponsChanged(); } if (selected) { icon.color = new Color(0.3f, 0.3f, 0.3f); } else { icon.color = Color.white; if (parent != null) { parent.icon.color = Color.white; } } }
public void OnShowCarousel_Scratch() { TutorialDialog.Create(). SetTutorialType(TutorialPart.NORMAL02.ConvertToTutorialFlagType()). Show( () => { #if BUILD_TYPE_DEBUG Debug.Log("TutorialCarousel Completed"); #endif m_Info.EnableBackKey(); TutorialFSM.Instance.SendFsmNextEvent(); }); }
/// <summary> /// チュートリアルダイアログを表示 /// </summary> private void showFirstTutorialDialog(TutorialDialog.FLAG_TYPE flagType, System.Action finishAction) { bool is_already_show = LocalSaveManagerRN.Instance.GetIsShowTutorialDialog(flagType); if (is_already_show == false) { TutorialDialog.Create() .SetTutorialType(flagType) .Show(finishAction); } else { finishAction(); } }
void OpenTutorialDialog(int idx) { if (index == idx && !isOpened) { if (needPause) { Time.timeScale = 0; } TutorialDialog.PopUp(new TutorialParam() { target = gameObject, needIncrease = needIncreaseSeq, auto = needAuto, dir = direction, needDescription = m_needDescription, description = m_description }); isOpened = true; } }
public void OnShowCarousel_UnitBuildUp() { SendStep( 408, () => { TutorialDialog.Create(). SetTutorialType(TutorialPart.BUILDUP.ConvertToTutorialFlagType()). Show( () => { #if BUILD_TYPE_DEBUG Debug.Log("TutorialCarousel Completed"); #endif TutorialFSM.Instance.SendFsmNextEvent(); }); }); }
void Start() { // ページ切り替え用トグルの設定 Context.Toggle = GetComponent <Toggle>(); ToggleGroup toggleGroup = GetComponentInParent <ToggleGroup>(); if (toggleGroup != null) { Context.Toggle.group = toggleGroup; } // コールバック設定 TutorialDialog carousel = GetComponentInParent <TutorialDialog>(); if (carousel != null) { Context.Toggle.onValueChanged.AddListener(carousel.OnChangedCarousel); } }
public IEnumerator OnPageInBefor() { while (m_GlobalMenu.getNextPageSeq().PageSwitchEventEnableBefore()) { yield return(null); } // 機能チュートリアルの表示 TutorialDialog.FLAG_TYPE flagType = m_GlobalMenu.NextSeq.ConvertToTutorialFlagType(); if (flagType != TutorialDialog.FLAG_TYPE.NONE && flagType != TutorialDialog.FLAG_TYPE.ALL) { bool isTutorial = (LocalSaveManagerRN.Instance.GetIsShowTutorialDialog(flagType) == false); if (isTutorial) { #if BUILD_TYPE_DEBUG Debug.LogError(string.Format("チュートリアルを表示する FLAG_TYPE:{0}", flagType.ToString())); #endif TutorialDialog.Create().SetTutorialType(flagType).Show(() => { isTutorial = false; }); } while (isTutorial) { #if BUILD_TYPE_DEBUG Debug.Log("IN_TUTORIAL"); #endif yield return(null); } } while (!m_GlobalMenu.getNextPageSeq().IsStart) { yield return(null); } m_GlobalMenu.getNextPageSeq().PageSwitchTriger(true, false, m_GlobalMenu.Back); GlobalMenuManagerFSM.Instance.SendFsmEvent("DO_NEXT"); }
// Use this for initialization void Start() { tutorialDialog = this.transform.GetComponent <TutorialDialog>(); player = GameObject.Find("character1").GetComponent <Player>(); craftSystem = GameObject.Find("CraftSystem").GetComponent <CraftSystem>(); pickWeapon = GameObject.Find("PickWeapon").GetComponent <CPickWeapon>(); trapSystem = GameObject.Find("character2").GetComponent <TrapSystem>(); tutorialDialog.tutorialRequest = this; Debug.Log(GameObject.Find("CraftSystem")); craftSystem.tutorialRequest = this; pickWeapon.tutorialRequest = this; player.tutorialRequest = this; trapSystem.tutorialRequest = this; Transform tempProjectile = GameObject.Find("ProjectileSystem").transform; projectile = new Projectile[tempProjectile.childCount]; for (int i = 0; i < projectile.Length; i++) { projectile[i] = tempProjectile.GetChild(i).GetComponent <Projectile>(); projectile[i].tutorialRequest = this; } }
public void OnHeroSelectGuide() { Dialog newDialog = Dialog.Create(DialogType.DialogOK); newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "tutorial_master_result_01_title"); newDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "tutorial_master_result_01_main"); newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button1"); newDialog.SetDialogEvent(DialogButtonEventType.OK, new System.Action(() => { TutorialManager.SendStep( 4, () => { TutorialDialog.Create().SetTutorialType(TutorialDialog.FLAG_TYPE.UNIT_HERO).Show(); m_select = false; SetUpButtons(); TutorialHeroSelectFSM.Instance.SendFsmNextEvent(); }); })); newDialog.DisableCancelButton(); newDialog.Show(); }
/// <summary> /// オブジェクトの作成 /// </summary> /// <returns></returns> public static TutorialDialog Create() { int carouselCcount = GetCarousel().Length; GameObject _tmpObj = Resources.Load("Prefab/TutorialDialog/TutorialDialog") as GameObject; if (_tmpObj == null) { return(null); } GameObject _newObj = Instantiate(_tmpObj) as GameObject; if (_newObj == null) { return(null); } UnityUtil.SetObjectEnabledOnce(_newObj, true); TutorialDialog carousel = _newObj.GetComponent <TutorialDialog>(); if (carousel == null) { return(null); } carousel.CarouselID = CarouselCounter; if (carouselCcount != 0) { carousel.m_CanvasSetting.ChangeSortingOrder(carouselCcount); } CarouselCounter++; return(carousel); }
public async void ShowTutorialDialogOrNot() { TutorialDialog td = new TutorialDialog(); await td.ShowAsync(); }
void OnShowDialog_ScratchInitial() { new SerialProcess().Add( (System.Action next) => { TutorialDialog.Create().SetTutorialType(TutorialDialog.FLAG_TYPE.GACHA).Show(() => { next(); }); }).Add( (System.Action next) => { Dialog.Create(DialogType.DialogOK). SetTitleFromTextKey(("TUTORIAL_SCRATCH_RESULT01_TITLE").ToLower()). SetMainFromTextKey(("TUTORIAL_SCRATCH_RESULT01_MAIN").ToLower()). SetOkEvent( () => { next(); }).Show(); }).Add( (System.Action next) => { Dialog.Create(DialogType.DialogOK). SetTitleFromTextKey(("TUTORIAL_SCRATCH_RESULT02_TITLE").ToLower()). SetMainFromTextKey(("TUTORIAL_SCRATCH_RESULT02_MAIN").ToLower()). SetOkEvent( () => { next(); }).Show(); }) .Add(next => { ServerDataUtilSend.SendPacketAPI_UserAuthentication(). setSuccessAction(_data => { next(); }). setErrorAction(_data => { //authError(_data.m_PacketCode, _data.m_PacketUniqueNum); next(); }). SendStart(); }) .Add( (System.Action next) => { InputLock(true); TutorialManager.SendStep( 601, () => { InputLock(false); TutorialFSM.Instance.SendFsmNextEvent(); next(); }); }).Flush(); }
private void openScoreInfo() { if (m_ScoreDialog != null || ServerApi.IsExists) { return; } SoundUtil.PlaySE(SEID.SE_MENU_OK); m_ScoreDialog = ScoreEventDialog.Create(SceneObjReferMainMenu.Instance.m_MainMenuGroupCamera.GetComponent <Camera>()); int[] event_ids = new int[scoreEventList.Count]; for (int i = 0; i < scoreEventList.Count; i++) { event_ids[i] = (int)scoreEventList[i].event_id; } ServerDataUtilSend.SendPacketAPI_GetUserScoreInfo(event_ids) .setSuccessAction((data) => { RecvGetUserScoreInfo scoreInfo = data.GetResult <RecvGetUserScoreInfo>(); if (scoreInfo != null && scoreInfo.result != null && scoreInfo.result.score_infos != null) { for (int i = 0; i < scoreInfo.result.score_infos.Length; i++) { PacketStructUserScoreInfo Info = scoreInfo.result.score_infos[i]; if (Info == null) { continue; } MasterDataScoreEvent scoreEventMaster = scoreEventList.Find((m) => m.event_id == Info.event_id); if (scoreEventMaster == null) { continue; } m_ScoreDialog.addScoreInfo(Info, scoreEventMaster); } bool isTutorial = (LocalSaveManagerRN.Instance.GetIsShowTutorialDialog(TutorialDialog.FLAG_TYPE.SCORE) == false); if (isTutorial) { #if BUILD_TYPE_DEBUG Debug.LogError(string.Format("チュートリアルを表示する FLAG_TYPE:{0}", TutorialDialog.FLAG_TYPE.SCORE.ToString())); #endif TutorialDialog.Create().SetTutorialType(TutorialDialog.FLAG_TYPE.SCORE).Show(() => { isTutorial = false; }); } m_HomeMenu.IsViewScoreInfo = false; m_ScoreDialog.Show(() => { m_ScoreDialog = null; m_HomeMenu.IsViewScoreInfo = true; }); } else { DestroyObject(m_ScoreDialog.gameObject); m_ScoreDialog = null; Dialog errorDialog = Dialog.Create(DialogType.DialogOK); errorDialog.SetDialogText(DialogTextType.Title, "警告"); errorDialog.SetDialogText(DialogTextType.MainText, "スコアイベントは開催されていません。"); errorDialog.SetDialogText(DialogTextType.OKText, "閉じる"); errorDialog.SetDialogEvent(DialogButtonEventType.OK, () => { m_HomeMenu.IsViewScoreInfo = false; }); errorDialog.Show(); } }) .setErrorAction((data) => { DestroyObject(m_ScoreDialog.gameObject); m_ScoreDialog = null; }) .SendStart(); }
void Start() { tutorialStep = 0; maxSteps = 3; tutorialDialog = tutorialPanel.GetComponent<TutorialDialog>(); tutorialDialog.previousBut.gameObject.SetActive(false); PlayTutorial(0); }
public void OnBtnClick() { if (bShowed == false || (CurrentInfo != null && CurrentInfo.Targets.Exists(e => e.type == eTutorialType.Drag)) || m_TargetsCollider.Count == 0 && m_Prefabs.Count == 0) { return; } CheckTargetCollider(); if (m_TargetsCollider.Count == 0) { while (m_Prefabs.Count > 0) { Destroy(m_Prefabs[0]); m_Prefabs.RemoveAt(0); } if (CutsceneInfo != null) {//Cut Scene if (CutsceneInfo.Targets.Count > 0) { TutorialDialog obj = NGUITools.AddChild(contents.gameObject, DialogPrefab).GetComponent <TutorialDialog>(); obj.Init(CutsceneInfo.Targets[0]); CutsceneInfo.Targets.RemoveAt(0); m_Prefabs.Add(obj.gameObject); bShowed = true; } else {//Cut Scene end TutorialInfo _cut_scene = CutsceneInfo; CutsceneInfo = null; if ((_cut_scene.CutSceneInfo.SceneType == eSceneType.PreAll || _cut_scene.CutSceneInfo.SceneType == eSceneType.PreAll_Wave3) && CheckBattleStart() == true) { SetConditionOK(); } else { if (Completed == true || (CurrentMenu == GameMenu.Battle && CurrentInfo.Condition != null && CurrentInfo.Condition.Type == eConditionType.BattleEndPopup) ) { gameObject.SetActive(false); } TimeManager.Instance.SetPause(false); } } } else {//Tutorial CurrentInfo.Targets.Remove(CurrentDialogTarget); TargetInfo info = CurrentInfo.Targets.Find(e => e.Menu == CurrentMenu && e.type == eTutorialType.Dialog); if (info != null) { SetDialogTarget(info); return; } CurrentDialogTarget = null; if (CurrentInfo.AfterNetworking == true) { gameObject.SetActive(false); return; } else if (CurrentInfo.Condition == null || CurrentInfo.Condition.IsConditionOK == true) { SetNextTutorial(); } } } }
void OnClickTutorialDialog(OthersInfoListContext item) { SoundUtil.PlaySE(SEID.SE_MENU_OK2); TutorialDialog.Create().SetTutorialType(item.TutorialDialogType).DisableSaveShowFlag().Show(); }
private async void WindowsPage_Loaded(object sender, RoutedEventArgs e) { #region App Title Bar // Hide default title bar. var coreTitleBar = CoreApplication.GetCurrentView().TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; UpdateTitleBarLayout(coreTitleBar); // Set XAML element as a draggable region. Window.Current.SetTitleBar(AppTitleBar); // Register a handler for when the size of the overlaid caption control changes. // For example, when the app moves to a screen with a different DPI. coreTitleBar.LayoutMetricsChanged += CoreTitleBar_LayoutMetricsChanged; // Register a handler for when the title bar visibility changes. // For example, when the title bar is invoked in full screen mode. coreTitleBar.IsVisibleChanged += CoreTitleBar_IsVisibleChanged; #endregion Log.Debug("[WindowsPage_Loaded] Intialize ..."); LoadingRing.IsActive = true; LoadingFrame.Visibility = Visibility.Visible; WindowsGrid.Visibility = Visibility.Visible; WindowsGrid1.Visibility = Visibility.Collapsed; WindowsFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo()); WindowsFrame1.Navigate(typeof(SettingsPage), false, new SuppressNavigationTransitionInfo()); LoadEULASettings(); LoadTutorialDone(); await Task.Delay(3000); LoadingFrame.Visibility = Visibility.Collapsed; LoadingRing.IsActive = false; WindowsGrid.Visibility = Visibility.Collapsed; WindowsGrid1.Visibility = Visibility.Collapsed; #region Show EULA page await(new ServiceViewModel()).Sendupdatestatus("ASUSSYS"); if (ServiceViewModel.returnnum == 1)//ASUS SYS { WindowsGrid.Visibility = Visibility.Visible; WindowsGrid1.Visibility = Visibility.Collapsed; if (!TutorialDoneOrNot) { TutorialDialog td = new TutorialDialog(); await td.ShowAsync(); } } else//Other SYS show EULA page { WindowsGrid.Visibility = Visibility.Visible; WindowsGrid1.Visibility = Visibility.Collapsed; if (!EulaAgreeOrNot) { EULADialog ed = new EULADialog(); await ed.ShowAsync(); } else if (!TutorialDoneOrNot) { TutorialDialog td = new TutorialDialog(); await td.ShowAsync(); } } #endregion }