少年修仙传客户端基础资源
client_Wu Xijin
2019-05-17 4c39ce3eedea5d7ab69eed85352fe7c19bd1febe
Assets/Editor/ScriptEditor/NewBieGuideEditorWindow.cs
@@ -4,7 +4,7 @@
using UnityEditor;
using Snxxz.UI;
using UnityEngine.UI;
using TableConfig;
public class NewBieGuideEditorWindow : EditorWindow
{
@@ -181,7 +181,7 @@
                    uiroot = GameObject.FindObjectOfType<UIRoot>();
                    if (uiroot == null)
                    {
                        var rootPrefab = Resources.Load<GameObject>("UI/Prefabs/UIRoot");
                        var rootPrefab = BuiltInLoader.LoadPrefab("UIRoot");
                        var root = GameObject.Instantiate(rootPrefab, Vector3.zero, Quaternion.identity);
                        root.name = "UIRoot";
                        uiroot = root.GetComponent<UIRoot>();
@@ -332,7 +332,7 @@
                    uiroot = GameObject.FindObjectOfType<UIRoot>();
                    if (uiroot == null)
                    {
                        var rootPrefab = Resources.Load<GameObject>("UI/Prefabs/UIRoot");
                        var rootPrefab = BuiltInLoader.LoadPrefab("UIRoot");
                        var root = GameObject.Instantiate(rootPrefab, Vector3.zero, Quaternion.identity);
                        root.name = "UIRoot";
                        uiroot = root.GetComponent<UIRoot>();
@@ -451,10 +451,10 @@
    void DrawNewbieGuides()
    {
        if (Config.Instance.inited && newbieGuides == null)
        if (ConfigInitiator.done && newbieGuides == null)
        {
            newbieGuides = new List<NewBieGuide>();
            var guides = Config.Instance.GetAllValues<GuideConfig>();
            var guides = GuideConfig.GetValues();
            foreach (var config in guides)
            {
                if (config.Type == 1)
@@ -507,10 +507,10 @@
    void DrawFunctionalGuides()
    {
        if (Config.Instance.inited && functionalGuides == null)
        if (ConfigInitiator.done && functionalGuides == null)
        {
            functionalGuides = new List<FunctionalGuide>();
            var guides = Config.Instance.GetAllValues<GuideConfig>();
            var guides = GuideConfig.GetValues();
            foreach (var config in guides)
            {
                if (config.Type == 2)
@@ -544,6 +544,11 @@
                if (GUILayout.Button("完成"))
                {
                    guide.Finish();
                }
                if (GUILayout.Button("重置"))
                {
                    guide.Reset();
                }
                EditorGUILayout.Space();
@@ -602,6 +607,11 @@
            FunctionalGuideCenter.Instance.RemoveGuide(guideId);
        }
        public void Reset()
        {
            NewBieCenter.Instance.ResetGuide(guideId);
        }
    }