示例#1
0
 /// <summary>
 /// 标题GUI
 /// </summary>
 private new void OnTitleGUI()
 {
     GUILayout.BeginHorizontal(EditorStyles.toolbar);
     if (GUILayout.Button(_asset.name, EditorStyles.toolbarButton))
     {
         Selection.activeObject = _asset;
         EditorGUIUtility.PingObject(_asset);
     }
     _isShowContent  = GUILayout.Toggle(_isShowContent, "Task Content", EditorStyles.toolbarButton);
     _isShowProperty = GUILayout.Toggle(_isShowProperty, "Property", EditorStyles.toolbarButton);
     GUILayout.FlexibleSpace();
     if (GUILayout.Button("ReSet", EditorStyles.toolbarButton))
     {
         for (int i = 0; i < _asset.Content.Count; i++)
         {
             TaskContentBase taskContent = _asset.Content[i];
             taskContent.ReSet();
             for (int j = 0; j < taskContent.Points.Count; j++)
             {
                 taskContent.Points[j].ReSet();
             }
         }
     }
     if (GUILayout.Button("About", EditorStyles.toolbarButton))
     {
     }
     GUILayout.EndHorizontal();
 }
 /// <summary>
 /// 重置状态
 /// </summary>
 private void ReSet()
 {
     for (int i = 0; i < _asset.Content.Count; i++)
     {
         TaskContentBase taskContent = _asset.Content[i];
         taskContent.ReSet();
         for (int j = 0; j < taskContent.Points.Count; j++)
         {
             taskContent.Points[j].ReSet();
         }
     }
 }