/// <summary> /// Defines a new NodeGroup which will be shown in the node explorer. /// </summary> /// <param name="name">The displayed name of the group.</param> /// <param name="icon">The displayed icon of the group and its children.</param> /// <param name="parent">The parent of the group, can be null.</param> public NodeGroup(string name, NodeIcon icon, NodeGroup parent) { _name = name; _icon = icon; if (parent != null) { parent.Children.Add(this); } }
public BlankPlugin() { AddResourceManager(Resources.ResourceManager); _fileManagers.Add( new FileManagerInfo(typeof(Brainiac.Design.FileManagers.FileManagerXML), "Behavior XML (*.xml)|*.xml", ".xml") ); _exporters.Add( new ExporterInfo(typeof(Brainiac.Design.Exporters.ExporterCs), "C# Behavior Exporter (Assign Properties)", true, "C#Properties") ); _exporters.Add( new ExporterInfo(typeof(Brainiac.Design.Exporters.ExporterCsUseParameters), "C# Behavior Exporter (Use Parameters)", true, "C#Parameters") ); NodeGroup actions= new NodeGroup(Resources.NodeGroupActions, NodeIcon.Action, null); _nodeGroups.Add(actions); actions.Items.Add(typeof(Nodes.ActionBlankNode)); }
public DesignMode() { // register resource manager AddResourceManager(Resources.ResourceManager); NodeGroup design= new NodeGroup("Design", NodeIcon.FlagRed, null); _nodeGroups.Add(design); design.Items.Add(typeof(Nodes.ActionDesign)); design.Items.Add(typeof(Nodes.CompositeDesign)); design.Items.Add(typeof(Nodes.ConditionDesign)); design.Items.Add(typeof(Nodes.DecoratorDesign)); design.Items.Add(typeof(Nodes.ImpulseDesign)); design.Items.Add(typeof(Events.EventDesign)); // register all the file managers _fileManagers.Add( new FileManagerInfo(typeof(Brainiac.Design.FileManagers.FileManagerXML), "Behaviour XML (*.xml)|*.xml", ".xml") ); }
public DaxPlugin() { // register all the file managers _fileManagers.Add(new FileManagerInfo(typeof(Brainiac.Design.FileManagers.FileManagerXML), "Behaviour XML (*.xml)|*.xml", ".xml")); NodeGroup conditions = new NodeGroup("Conditions", NodeIcon.Condition, null); _nodeGroups.Add(conditions); NodeGroup selectors = new NodeGroup("Selectors", NodeIcon.Selector, null); _nodeGroups.Add(selectors); NodeGroup parallel = new NodeGroup("Parallel", NodeIcon.Parallel, null); _nodeGroups.Add(parallel); NodeGroup decorators = new NodeGroup("Decorators", NodeIcon.Decorator , null); _nodeGroups.Add(decorators); NodeGroup actions = new NodeGroup("Actions", NodeIcon.Action, null); _nodeGroups.Add(actions); NodeGroup aiml = new NodeGroup("AIML", NodeIcon.Action, null); _nodeGroups.Add(aiml); NodeGroup valence = new NodeGroup("Valence", NodeIcon.Impulse, null); _nodeGroups.Add(valence); NodeGroup sapi = new NodeGroup("Sapi", NodeIcon.Decorator, null); _nodeGroups.Add(sapi); actions.Items.Add(typeof(Nodes.DaxNode)); actions.Items.Add(typeof(Nodes.DaxFlushqueue)); actions.Items.Add(typeof(Nodes.DaxEnqueue)); actions.Items.Add(typeof(Nodes.DaxChat)); actions.Items.Add(typeof(Nodes.DaxSubbehavior)); actions.Items.Add(typeof(Nodes.DaxStarttimer)); actions.Items.Add(typeof(Nodes.DaxStoptimer)); actions.Items.Add(typeof(Nodes.DaxTellkb)); actions.Items.Add(typeof(Nodes.DaxTellbasekb)); actions.Items.Add(typeof(Nodes.DaxTellkbocc)); actions.Items.Add(typeof(Nodes.DaxClearkb)); actions.Items.Add(typeof(Nodes.DaxClearbasekb)); actions.Items.Add(typeof(Nodes.DaxProcesskb)); actions.Items.Add(typeof(Nodes.DaxTaskguest)); actions.Items.Add(typeof(Nodes.DaxBreaker)); selectors.Items.Add(typeof(Nodes.DaxSelector)); selectors.Items.Add(typeof(Nodes.DaxWeighted)); selectors.Items.Add(typeof(Nodes.DaxRandom )); parallel.Items.Add(typeof(Nodes.DaxBehavior)); parallel.Items.Add(typeof(Nodes.DaxRbehavior)); parallel.Items.Add(typeof(Nodes.DaxParallel)); parallel.Items.Add(typeof(Nodes.DaxSequence)); decorators.Items.Add(typeof(Nodes.DaxLoop)); decorators.Items.Add(typeof(Nodes.DaxLoopuntil)); decorators.Items.Add(typeof(Nodes.DaxSubaiml)); conditions.Items.Add(typeof(Nodes.DaxAssert)); conditions.Items.Add(typeof(Nodes.DaxAsserttimer)); conditions.Items.Add(typeof(Nodes.DaxAssertguest)); valence.Items.Add(typeof(Nodes.DaxDrive)); valence.Items.Add(typeof(Nodes.DaxMotive)); valence.Items.Add(typeof(Nodes.DaxInhibit)); valence.Items.Add(typeof(Nodes.DaxRelease)); aiml.Items.Add(typeof(Nodes.DaxCategory)); aiml.Items.Add(typeof(Nodes.DaxPattern)); aiml.Items.Add(typeof(Nodes.DaxThat)); aiml.Items.Add(typeof(Nodes.DaxTemplate)); aiml.Items.Add(typeof(Nodes.DaxLi)); aiml.Items.Add(typeof(Nodes.DaxTask)); aiml.Items.Add(typeof(Nodes.DaxSay)); aiml.Items.Add(typeof(Nodes.DaxRemoteserver)); aiml.Items.Add(typeof(Nodes.DaxState)); aiml.Items.Add(typeof(Nodes.DaxTopic)); sapi.Items.Add(typeof(Nodes.DaxSapi)); sapi.Items.Add(typeof(Nodes.DaxBookmark)); sapi.Items.Add(typeof(Nodes.DaxSilence)); // register all the file managers _fileManagers.Add(new FileManagerInfo(typeof(DaxImporter), "Dax BTX (*.btx)|*.btx", ".btx",true)); // register all the exporters _exporters.Add(new ExporterInfo(typeof(DaxExporter), "Dax Behavior XML", true, "BTX",true)); }
/// <summary> /// Defines a new NodeGroup which will be shown in the node explorer. /// </summary> /// <param name="name">The displayed name of the group.</param> /// <param name="icon">The displayed icon of the group and its children.</param> /// <param name="parent">The parent of the group, can be null.</param> public NodeGroup(string name, NodeIcon icon, NodeGroup parent) { _name= name; _icon= icon; if(parent !=null) parent.Children.Add(this); }
public Vampire() { // register resource manager AddResourceManager(Resources.ResourceManager); // create all the groups we need in the node explorer NodeGroup actions= new NodeGroup(Resources.NodeGroupActions, NodeIcon.Action, null); _nodeGroups.Add(actions); NodeGroup conditions= new NodeGroup(Resources.NodeGroupConditions, NodeIcon.Condition, null); _nodeGroups.Add(conditions); NodeGroup decorators= new NodeGroup(Resources.NodeGroupDecorators, NodeIcon.Decorator, null); _nodeGroups.Add(decorators); NodeGroup impulses= new NodeGroup(Resources.NodeGroupImpulses, NodeIcon.Impulse, null); _nodeGroups.Add(impulses); NodeGroup events= new NodeGroup(Resources.NodeGroupEvents, NodeIcon.Event, null); _nodeGroups.Add(events); NodeGroup composites = new NodeGroup(Resources.NodeGroupComposites, NodeIcon.Parallel, null); _nodeGroups.Add(composites); // create all the action nodes actions.Items.Add(typeof(Actions.Attack)); actions.Items.Add(typeof(Actions.ChooseFarthestSkill)); actions.Items.Add(typeof(Actions.ChooseRandomSkill)); actions.Items.Add(typeof(Actions.ChooseTargetInView)); actions.Items.Add(typeof(Actions.ChooseTargetWhoAttack)); actions.Items.Add(typeof(Actions.EndFight)); actions.Items.Add(typeof(Actions.MoveToAttackRange)); // create all the condition nodes actions.Items.Add(typeof(Conditions.HasRoleInView)); actions.Items.Add(typeof(Conditions.HasTarget)); actions.Items.Add(typeof(Conditions.IsAttacked)); // create all the decorator nodes decorators.Items.Add(typeof(Decorators.Not)); decorators.Items.Add(typeof(Decorators.Loop)); decorators.Items.Add(typeof(Decorators.Successful)); // create all the impulse nodes //impulses.Items.Add(typeof(Impulses.Impulse)); // create all the event nodes //events.Items.Add(typeof(Events.FocusDestroyed)); //events.Items.Add(typeof(Events.UnitBuilt)); //events.Items.Add(typeof(Events.UnitDestroyed)); // create all the composite nodes composites.Items.Add(typeof(Composites.Selector)); composites.Items.Add(typeof(Composites.Sequence)); composites.Items.Add(typeof(Composites.Parallel)); // register all the file managers _fileManagers.Add( new FileManagerInfo(typeof(Brainiac.Design.FileManagers.FileManagerXML), "Behaviour XML (*.xml)|*.xml", ".xml") ); // register all the exporters //_exporters.Add( new ExporterInfo(typeof(Brainiac.Design.Exporters.ExporterCs), "C# Behavior Exporter (Assign Properties)", true, "C#Properties") ); //_exporters.Add( new ExporterInfo(typeof(Brainiac.Design.Exporters.ExporterCsUseParameters), "C# Behavior Exporter (Use Parameters)", true, "C#Parameters") ); }
public ProjectHoshimi() { // register resource manager AddResourceManager(Resources.ResourceManager); // create all the groups we need in the node explorer NodeGroup actions= new NodeGroup(Resources.NodeGroupActions, NodeIcon.Action, null); _nodeGroups.Add(actions); NodeGroup conditions= new NodeGroup(Resources.NodeGroupConditions, NodeIcon.Condition, null); _nodeGroups.Add(conditions); NodeGroup decorators= new NodeGroup(Resources.NodeGroupDecorators, NodeIcon.Decorator, null); _nodeGroups.Add(decorators); NodeGroup impulses= new NodeGroup(Resources.NodeGroupImpulses, NodeIcon.Impulse, null); _nodeGroups.Add(impulses); NodeGroup events= new NodeGroup(Resources.NodeGroupEvents, NodeIcon.Event, null); _nodeGroups.Add(events); NodeGroup selectors= new NodeGroup(Resources.NodeGroupSelectors, NodeIcon.Selector, null); _nodeGroups.Add(selectors); NodeGroup sequences= new NodeGroup(Resources.NodeGroupSequences, NodeIcon.Sequence, null); _nodeGroups.Add(sequences); // create all the action nodes actions.Items.Add(typeof(Nodes.ActionBuild)); actions.Items.Add(typeof(Nodes.ActionFocusClosest)); actions.Items.Add(typeof(Nodes.ActionFollowFocus)); actions.Items.Add(typeof(Nodes.ActionInheritFocus)); actions.Items.Add(typeof(Nodes.ActionMoveTillFocusIsInRange)); actions.Items.Add(typeof(Nodes.ActionTransferOxygenFromFocus)); actions.Items.Add(typeof(Nodes.ActionTransferOxygenToFocus)); // create all the condition nodes conditions.Items.Add(typeof(Nodes.ConditionCargoIsFull)); conditions.Items.Add(typeof(Nodes.ConditionFocusIs)); conditions.Items.Add(typeof(Nodes.ConditionHasLessThan)); conditions.Items.Add(typeof(Nodes.ConditionHasNeedleWithLessServantsThan)); // create all the decorator nodes decorators.Items.Add(typeof(Nodes.DecoratorNot)); decorators.Items.Add(typeof(Nodes.DecoratorLoop)); decorators.Items.Add(typeof(Nodes.DecoratorTrue)); // create all the impulse nodes impulses.Items.Add(typeof(Nodes.Impulse)); // create all the event nodes events.Items.Add(typeof(Events.FocusDestroyed)); events.Items.Add(typeof(Events.UnitBuilt)); events.Items.Add(typeof(Events.UnitDestroyed)); // create all the selector nodes selectors.Items.Add(typeof(Nodes.SelectorLinear)); // create all the sequence nodes sequences.Items.Add(typeof(Nodes.SequenceLinear)); // register all the file managers _fileManagers.Add( new FileManagerInfo(typeof(Brainiac.Design.FileManagers.FileManagerXML), "Behaviour XML (*.xml)|*.xml", ".xml") ); // register all the exporters _exporters.Add( new ExporterInfo(typeof(Brainiac.Design.Exporters.ExporterCs), "C# Behavior Exporter (Assign Properties)", true, "C#Properties") ); _exporters.Add( new ExporterInfo(typeof(Brainiac.Design.Exporters.ExporterCsUseParameters), "C# Behavior Exporter (Use Parameters)", true, "C#Parameters") ); }