/// <summary>
 /// 编辑引导
 /// </summary>
 /// <param name="id"></param>
 private void EditGuide(int id)
 {
     curGuideData = data.GetGuideData(id);
     if (curGuideData != null)
     {
         ChangeTag(2);
     }
 }
 private void ShowGuideTitle(GuideData d)
 {
     GUILayout.BeginHorizontal();
     GUILayout.Label("引导编号:", GUILayout.Width(100));
     GUILayout.Label(d.id + "", GUILayout.Width(150));
     GUILayout.Label("引导备注:", GUILayout.Width(100));
     GUILayout.Label(d.desc, GUILayout.Width(150));
     GUILayout.EndHorizontal();
 }
 /// <summary>
 /// 显示编辑界面列表
 /// </summary>
 /// <param name="d"></param>
 private void ShowGuideSteps(GuideData d)
 {
     ShowLine("步骤");
     stepPos = GUILayout.BeginScrollView(stepPos, GUILayout.Width(580), GUILayout.Height(400));
     if (d.GetCount() > 0)
     {
         List <GuideSubData> list = d.GetData();
         if (list != null)
         {
             for (int i = 0; i < list.Count; i++)
             {
                 ShowLine("", 500);
                 ShowOneStep(list[i]);
             }
         }
     }
     else
     {
         GUILayout.Label("请先添加步骤");
     }
     GUILayout.EndScrollView();
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("新增步骤", GUILayout.Width(100)))
     {
         curGuideData.InsertData();
     }
     GUILayout.Label("", GUILayout.Width(100));
     insertPosIndex = EditorGUILayout.IntField(insertPosIndex, GUILayout.Width(50));
     if (GUILayout.Button("插入步骤", GUILayout.Width(100)))
     {
         curGuideData.InsertData(insertPosIndex - 1);
     }
     if (GUILayout.Button("保存", GUILayout.Width(100)))
     {
         SaveGuide();
     }
     GUILayout.EndHorizontal();
     if (Application.isPlaying == true)
     {
         if (GUILayout.Button("播放", GUILayout.Height(40)))
         {
             PlayGuide(d.id);
         }
     }
 }
        public void AddGuide(int id)
        {
            if (data == null)
            {
                data = new Dictionary <int, GuideData>();
            }
            GuideData d = new GuideData();

            d.id = id;
            if (data.ContainsKey(id))
            {
                data[id] = d;
            }
            else
            {
                data.Add(id, d);
            }
        }
 private void ShowOneGuide(GuideData guideData)
 {
     GUILayout.BeginHorizontal();
     GUILayout.Box(guideData.id + "", GUILayout.Width(100));
     if (guideData == null)
     {
         return;
     }
     guideData.isForce = EditorGUILayout.Toggle(guideData.isForce, GUILayout.Width(50));
     guideData.desc    = EditorGUILayout.TextField(guideData.desc, GUILayout.Width(200));
     GUILayout.Label(guideData.GetCount() + "", GUILayout.Width(50));
     if (GUILayout.Button("编辑", GUILayout.Width(80)))
     {
         EditGuide(guideData.id);
     }
     if (GUILayout.Button("删除", GUILayout.Width(80)))
     {
         DelGuide(guideData.id);
     }
     GUILayout.EndHorizontal();
 }