少年修仙传客户端基础资源
client_Hale
2019-11-05 857470a8e17241c4c920ad4366c3f5cdd9a52465
Assets/Editor/ScriptEditor/NewBieGuideEditorWindow.cs
@@ -4,7 +4,7 @@
using UnityEditor;
using Snxxz.UI;
using UnityEngine.UI;
using TableConfig;
public class NewBieGuideEditorWindow : EditorWindow
{
@@ -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>();
@@ -363,6 +363,7 @@
            guideContent = so.tipContent;
            arrowPosition = so.arrowPosition;
            selectBox = so.selectBox;
            effect2 = so.effect2;
            var selectBosAssetName = string.Empty;
            switch (so.selectBox)
            {
@@ -410,6 +411,7 @@
            so.tipContent = guideContent;
            so.arrowPosition = arrowPosition;
            so.selectBox = selectBox;
            so.effect2 = effect2;
            if (m_ClickTarget != null)
            {
                so.UIElementPath = UIUtility.GetUIElementRelativePath(uiroot, m_ClickTarget);
@@ -451,10 +453,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 +509,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 +546,11 @@
                if (GUILayout.Button("完成"))
                {
                    guide.Finish();
                }
                if (GUILayout.Button("重置"))
                {
                    guide.Reset();
                }
                EditorGUILayout.Space();
@@ -602,6 +609,11 @@
            FunctionalGuideCenter.Instance.RemoveGuide(guideId);
        }
        public void Reset()
        {
            NewBieCenter.Instance.ResetGuide(guideId);
        }
    }