private void CreateAgent(int x, int y) { var agent = Plugin.CreateAgent(Space, x, y); Goals.Initialize(agent); Agents.Add(agent); AgentCreated?.Invoke(agent); }
public void AddAgent(Agent agentModel) { if (agentModel == null) { return; } if (!_allAgents.ContainsKey(agentModel.Name)) { if (_allAgents.TryAdd(agentModel.Name, agentModel)) { AgentCreated.Invoke(this, new AddedAgentEventArgs(agentModel)); } } }