Ejemplo n.º 1
0
 public static void Update()
 {
     if (checkForErrors)
     {
         ErrorChecker.CheckForErrors(FsmEditor.Active.Root);
         FsmEditor.RepaintAll();
     }
 }
Ejemplo n.º 2
0
		private void Update(){
			if (FsmEditor.Active != null) {
				ErrorChecker.Update ();	
				if (EditorApplication.isPlaying) {
					debugProgress += Time.deltaTime * 30;
					if (debugProgress > 142) {
						debugProgress = 0;
					}
					FsmEditor.RepaintAll ();
				}
			}
		}
Ejemplo n.º 3
0
 public static void Update()
 {
     if (checkForErrors)
     {
         StateMachine[] fsms = Resources.FindObjectsOfTypeAll <StateMachine>();
         for (int i = 0; i < fsms.Length; i++)
         {
             ErrorChecker.CheckForErrors(fsms[i]);
         }
         FsmEditor.RepaintAll();
     }
 }
Ejemplo n.º 4
0
        protected override void OnHeaderGUI()
        {
            GUILayout.BeginVertical("IN BigTitle");
            EditorGUIUtility.labelWidth = 50;

            GUILayout.BeginHorizontal();

            node.Name = EditorGUILayout.TextField("Name", node.Name);
            if (node.GetType() == typeof(State) && !node.IsStartNode)
            {
                GUIStyle style = FsmEditorStyles.GetNodeStyle(node.color, false, false);
                Rect     rect  = GUILayoutUtility.GetRect(25, 17, style);
                rect.y += 1;
                if (GUI.Button(rect, GUIContent.none, style))
                {
                    GenericMenu menu = new GenericMenu();
                    foreach (NodeColor color in System.Enum.GetValues(typeof(NodeColor)))
                    {
                        if (color != NodeColor.Aqua && color != NodeColor.Orange)
                        {
                            int mColor = (int)color;
                            menu.AddItem(new GUIContent(color.ToString()), node.color == mColor, delegate() {
                                node.color = mColor;
                            });
                        }
                    }
                    menu.ShowAsContext();
                }
            }
            GUILayout.EndHorizontal();
            GUILayout.Label("Description:");
            node.comment = EditorGUILayout.TextArea(node.comment, GUILayout.MinHeight(45));
            GUILayout.EndVertical();

            if (GUI.changed)
            {
                EditorUtility.SetDirty(node);
                FsmEditor.RepaintAll();
            }
        }