public void ResetTransitionList() { this.transitions = this.node.Transitions; this.transitionList = new ReorderableList (this.transitions, "Transition",false, false) { onDrawHeaderContent = new ReorderableList.OnHeaderContent(this.DrawTransitionHeader), drawElementCallback = new ReorderableList.ElementCallbackDelegate(this.OnTransitionElement), onSelectCallback = new ReorderableList.SelectCallbackDelegate(this.SelectTransition), onContextClick = new ReorderableList.ContextCallbackDelegate(this.OnTransitionContextClick), onReorderCallback=new ReorderableList.ReorderCallbackDelegate(this.OnReorderTransitionList) }; this.ResetConditionList (); this.host.Repaint(); if(FsmEditor.instance != null) FsmEditor.instance.Repaint (); }
private void ResetActionList() { this.actions = this.state.Actions; this.actionList = new ReorderableList (this.actions, "Action", true, true) { drawElementCallback = new ReorderableList.ElementCallbackDelegate(this.OnActionElement), onReorderCallback = new ReorderableList.ReorderCallbackDelegate(this.OnReorderList), onAddCallback = new ReorderableList.AddCallbackDelegate(delegate(){ FsmGUIUtility.SubclassMenu<StateAction> (CreateAction); }), onContextClick=new ReorderableList.ContextCallbackDelegate(delegate(int index){ FsmGUIUtility.ExecutableContextMenu(actions[index],state).ShowAsContext(); }), }; this.host.Repaint(); if(FsmEditor.instance != null) FsmEditor.instance.Repaint (); }
private void ResetConditionList() { if (transition == null) { return; } this.conditions = this.transition.Conditions; this.conditionList = new ReorderableList (this.conditions, "Condition", true, true) { drawElementCallback = new ReorderableList.ElementCallbackDelegate(this.OnConditionElement), onReorderCallback = new ReorderableList.ReorderCallbackDelegate(this.OnReorderConditionList), onAddCallback = new ReorderableList.AddCallbackDelegate(delegate(){ FsmGUIUtility.SubclassMenu<Condition> (CreateCondition); }), onContextClick=new ReorderableList.ContextCallbackDelegate(delegate(int index){ FsmGUIUtility.ExecutableContextMenu(conditions[index],node).ShowAsContext(); }), }; this.host.Repaint(); if(FsmEditor.instance != null) FsmEditor.instance.Repaint (); }