Exemplo n.º 1
0
        public ScenarioAgent(string name, Archetype archetype)
        {
            Name           = name;
            AgentArchetype = archetype;

            Position = new PointF(0.0f, 0.0f);
            Radius   = 1.0f;

            Properties      = new Dictionary <string, double>();
            StartProperties = new Dictionary <string, double>();
        }
Exemplo n.º 2
0
        public ScenarioAgent(string name, Archetype archetype)
        {
            Name           = name;
            AgentArchetype = archetype;

            Position = new PointF(0.0f, 0.0f);
            Radius   = 1.0f;

            Properties = new Dictionary <KnowledgeBase.Record, object>();

            Color = Color.LightSteelBlue;
        }
Exemplo n.º 3
0
        internal void Attach(Archetype archetype, Project project)
        {
            EditArchetype = archetype;
            NameEditWidget.Attach("Archetype", EditArchetype);
            EditArchetype.DialogRebuildNeeded += Rebuild;
            EditProject = project;

            EnabledBehaviorSetsListBox.Items.Clear();
            foreach (var behaviorSet in project.BehaviorSets)
            {
                EnabledBehaviorSetsListBox.Items.Add(behaviorSet, EditArchetype.BehaviorSets.Contains(behaviorSet));
            }
        }
Exemplo n.º 4
0
        public void Delete(Archetype archetype)
        {
            Archetypes.Remove(archetype);

            foreach (var scenario in Scenarios)
            {
                foreach (var agent in scenario.Agents)
                {
                    if (agent.AgentArchetype == archetype)
                    {
                        agent.AgentArchetype = null;
                    }
                }
            }

            ItemDelete(this, new DeletionEventArgs {
                DeletedObject = archetype
            });
        }