| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEditor; |
| | | using Snxxz.UI; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEditor;
|
| | | using Snxxz.UI;
|
| | | using UnityEngine.UI;
|
| | |
|
| | |
|
| | | public class NewBieGuideEditorWindow : EditorWindow
|
| | | { |
| | | [MenuItem("程序/新手调试器")] |
| | | {
|
| | | [MenuItem("程序/新手调试器")]
|
| | | public static void Create()
|
| | | {
|
| | | var window = GetWindow(typeof(NewBieGuideEditorWindow), false, "新手调试器") as NewBieGuideEditorWindow;
|
| | |
| | | }
|
| | |
|
| | | EditorGUILayout.EndVertical();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void ImportNewBieConfig()
|
| | | {
|
| | | var fileName = StringUtility.Contact("NewBieGuideStep_", stepId, ".asset");
|
| | |
| | | }
|
| | |
|
| | | Repaint();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void ExportNewBieConfig()
|
| | | {
|
| | | var fileName = StringUtility.Contact("NewBieGuideStep_", stepId, ".asset");
|
| | |
| | | AssetDatabase.Refresh();
|
| | | EditorUtility.SetDirty(so);
|
| | | AssetDatabase.SaveAssets();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void ImportRecommondConfig()
|
| | | {
|
| | | var fileName = StringUtility.Contact("FunctionalGuideStep_", stepId, ".asset");
|
| | |
| | | }
|
| | |
|
| | | Repaint();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void ExportRecommondConfig()
|
| | | {
|
| | | var fileName = StringUtility.Contact("FunctionalGuideStep_", stepId, ".asset");
|
| | |
| | | AssetDatabase.Refresh();
|
| | | EditorUtility.SetDirty(so);
|
| | | AssetDatabase.SaveAssets();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void StartNewBieGuide()
|
| | | {
|
| | | NewBieCenter.Instance.currentGuide = guideId;
|
| | | NewBieCenter.Instance.StartNewBieGuide(guideId);
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void StartFunctionalGuide()
|
| | | {
|
| | | FunctionalGuideCenter.Instance.StartGuide(guideId);
|
| | |
| | | var instance = UIUtility.CreateWidget("GuideUsher", "GuideUsher");
|
| | |
|
| | | return instance;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | enum GuideType
|
| | | {
|
| | | NewBie, //新手引导,半强制性的。
|
| | | Recommend,//功能性引导,推荐性的。
|
| | | } |
| | | |
| | | List<NewBieGuide> newbieGuides = null; |
| | | }
|
| | |
|
| | | List<NewBieGuide> newbieGuides = null;
|
| | | List<FunctionalGuide> functionalGuides = null;
|
| | | private Vector2 scrollPosition; |
| | | |
| | | private Vector2 scrollPosition;
|
| | |
|
| | | void DrawNewbieGuides()
|
| | | {
|
| | | if (ConfigInitiator.done && newbieGuides == null)
|
| | |
| | | GUILayout.EndScrollView();
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | void DrawFunctionalGuides()
|
| | | {
|
| | | if (ConfigInitiator.done && functionalGuides == null)
|
| | |
| | | }
|
| | |
|
| | |
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public class NewBieGuide
|
| | | {
|
| | | public int guideId;
|
| | |
| | | {
|
| | | NewBieCenter.Instance.ResetGuide(guideId);
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public class FunctionalGuide
|
| | | {
|
| | | public int guideId;
|
| | |
| | | NewBieCenter.Instance.ResetGuide(guideId);
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|