/// <summary> /// Creates a new referenced behaviour. The behaviour which will be referenced is read from the Reference attribute. /// </summary> public ReferencedBehavior() : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, string.Empty, true, Resources.ReferencedBehaviorDesc) { _genericChildrenLocal = new ConnectorMultiple(_children, string.Empty, "GenericChildren", 1, int.MaxValue); _genericChildren = _genericChildrenLocal; // when this node is saved, the children won't as they belong to another behaviour _saveChildren = false; _referencedBehavior = null; }
/// <summary> /// Creates a new referenced behaviour. /// </summary> /// <param name="rootBehavior">The behaviour this node belongs not. NOT the one is references.</param> /// <param name="referencedBehavior">The behaviour you want to reference.</param> public ReferencedBehavior(BehaviorNode rootBehavior, BehaviorNode referencedBehavior) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, ((Node)referencedBehavior).Label, true, Resources.ReferencedBehaviorDesc) { _genericChildrenLocal = new ConnectorMultiple(_children, string.Empty, "GenericChildren", 1, int.MaxValue); _genericChildren = _genericChildrenLocal; // when this node is saved, the children won't as they belong to another behaviour _saveChildren = false; _referencedBehavior = referencedBehavior; _referenceFilename = _referencedBehavior.FileManager.Filename; ((Node)_referencedBehavior).WasModified += new WasModifiedEventDelegate(referencedBehavior_WasModified); }
/// <summary> /// Creates a new instance of a referenced behaviour node for a sub-reference graph. /// </summary> /// <param name="impulse">The original non-sub-reference graph referenced behaviour node.</param> public ReferencedBehavior(ReferencedBehavior referencedBehavior) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, referencedBehavior.BaseLabel, false, referencedBehavior.Description) { _genericChildrenLocal = new ConnectorMultiple(_children, string.Empty, "GenericChildren", 1, int.MaxValue); _genericChildren = _genericChildrenLocal; // when this node is saved, the children won't as they belong to another behaviour _saveChildren = false; _referencedBehavior = null; referencedBehavior.CloneProperties(this); OnPropertyValueChanged(false); CopyEventHandlers(referencedBehavior); #if DEBUG _debugIsSubreferencedGraphNode = true; #endif }
public Or() : base(Resources.Or, Resources.OrDesc) { _conditions = new ConnectorCondition(_children, "Condition {0}", "Conditions", 2, int.MaxValue); }
public CompoundAction() : base(Resources.CompoundAction, Resources.CompoundActionDesc) { _preconditions = new ConnectorCondition(_children, "Precondition {0}", "Preconditions", 1, int.MaxValue); _methods= new ConnectorMultiple(_children, "Action {0}", "Actions", 1, int.MaxValue); }
public Method(string label) : base(label, false) { _preconditions = new ConnectorPrecondition(_children, "Precondition {0}", "Preconditions", 1, int.MaxValue); _genericChildren = new ConnectorTask(_children, "Task {0}", "Tasks", 1, int.MaxValue); }
public CompoundTask() : base("Compound Task", "Calls fitting methods.") { _preconditions = new ConnectorPrecondition(_children, "Precondition {0}", "Preconditions", 1, int.MaxValue); _methods = new ConnectorMultiple(_children, "Method {0}", "Methods", 1, int.MaxValue); _methods.IsReadOnly = true; }
public Selector(string label, string description) : base(label, description) { _acceptsEvents = true; _genericChildren = new ConnectorMultiple(_children, "", "GenericChildren", 2, int.MaxValue); }
/// <summary> /// Creates a new referenced behaviour. /// </summary> /// <param name="rootBehavior">The behaviour this node belongs not. NOT the one is references.</param> /// <param name="referencedBehavior">The behaviour you want to reference.</param> public ReferencedBehavior(BehaviorNode rootBehavior, BehaviorNode referencedBehavior) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, ((Node)referencedBehavior).Label, true, Resources.ReferencedBehaviorDesc) { _genericChildrenLocal= new ConnectorMultiple(_children, string.Empty, "GenericChildren", 1, int.MaxValue); _genericChildren= _genericChildrenLocal; // when this node is saved, the children won't as they belong to another behaviour _saveChildren= false; _referencedBehavior= referencedBehavior; _referenceFilename= _referencedBehavior.FileManager.Filename; ((Node)_referencedBehavior).WasModified+= new WasModifiedEventDelegate(referencedBehavior_WasModified); }
public Sequence(string label, string description) : base(label, description) { _genericChildren = new ConnectorMultiple(_children, "", "GenericChildren", 2, int.MaxValue); }
public Any() : base(Resources.OperatorAny, Resources.OperatorAnyDesc) { _tasks = new ConnectorTask(_children, "Task {0}", "Tasks", 2, int.MaxValue); }
public Selector(string label, string description) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, label, true, description) { _genericChildren = new ConnectorMultiple(_children, "{0}", "GenericChildren", 2, int.MaxValue); //modified for text adventure }
/// <summary> /// Creates a new referenced behaviour. The behaviour which will be referenced is read from the Reference attribute. /// </summary> public ReferencedBehavior() : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, string.Empty, true, Resources.ReferencedBehaviorDesc) { _genericChildrenLocal= new ConnectorMultiple(_children, string.Empty, "GenericChildren", 1, int.MaxValue); _genericChildren= _genericChildrenLocal; // when this node is saved, the children won't as they belong to another behaviour _saveChildren= false; _referencedBehavior= null; }
/// <summary> /// Creates a new instance of a referenced behaviour node for a sub-reference graph. /// </summary> /// <param name="impulse">The original non-sub-reference graph referenced behaviour node.</param> public ReferencedBehavior(ReferencedBehavior referencedBehavior) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, referencedBehavior.BaseLabel, false, referencedBehavior.Description) { _genericChildrenLocal= new ConnectorMultiple(_children, string.Empty, "GenericChildren", 1, int.MaxValue); _genericChildren= _genericChildrenLocal; // when this node is saved, the children won't as they belong to another behaviour _saveChildren= false; _referencedBehavior= null; referencedBehavior.CloneProperties(this); OnPropertyValueChanged(false); CopyEventHandlers(referencedBehavior); #if DEBUG _debugIsSubreferencedGraphNode= true; #endif }
public Parallel(string label, string description) : base(label, description) { _genericChildren = new ConnectorMultiple(_children, "And", "GenericChildren", 2, int.MaxValue); }
public Parallel(string label, string description) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, label, true, description) { _genericChildren = new ConnectorMultiple(_children, "And", "GenericChildren", 2, int.MaxValue); }
public Selector(string label, string description) : base(label, description) { _genericChildren = new ConnectorMultiple(_children, "Try {0}", "GenericChildren", 2, int.MaxValue); }
public Sequence(string label, string description) : base(label, description) { CreateInterruptChild(); _genericChildren = new ConnectorMultiple(_children, "", Connector.kGeneric, 2, int.MaxValue); }
public Or() : base(Resources.OperatorOr, Resources.OperatorOrDesc) { _preconditions = new ConnectorPrecondition(_children, "Precondition {0}", "Preconditions", 2, int.MaxValue); }
public Selector(string label, string description) : base(label, description) { _interruptChild = new ConnectorSingle(_children, "", Connector.kInterupt); _genericChildren = new ConnectorMultiple(_children, "", Connector.kGeneric, 2, int.MaxValue); }
public CompoundAction() : base(Resources.CompoundAction, Resources.CompoundActionDesc) { _preconditions = new ConnectorCondition(_children, "Precondition {0}", "Preconditions", 1, int.MaxValue); _methods = new ConnectorMultiple(_children, "Action {0}", "Actions", 1, int.MaxValue); }
public Selector(string label, string description) : base(null, _theBackgroundBrush, _theDraggedBackgroundBrush, label, true, description) { _genericChildren= new ConnectorMultiple(_children, "Try {0}", "GenericChildren", 2, int.MaxValue); }
public If() : base(Resources.OperatorIf, Resources.OperatorIfDesc) { _preconditions = new ConnectorPrecondition(_children, "Precondition {0}", "Preconditions", 1, int.MaxValue); _tasks = new ConnectorTask(_children, "Task {0}", "Tasks", 1, int.MaxValue); }