private PersonAgent AddPersonAgent() { var actor = PersonAgent.CreateInstance(this, ExampleMainOrganization.Templates.Human); actor.GroupId = _groupId; var email = EmailEntity.CreateInstance(ExampleMainOrganization.ArtifactNetwork, MainOrganization.Models); ActorResource.CreateInstance(ExampleMainOrganization.ArtifactNetwork.ActorResource, actor.AgentId, email.EntityId, new ResourceUsage(0)); ActorOrganization.CreateInstance(ExampleMainOrganization.ArtifactNetwork.ActorOrganization, actor.AgentId, _groupId); return(actor); }
public override void SetAgents() { base.SetAgents(); var group = GroupAgent.CreateInstance(this); for (var i = 0; i < ExampleMainOrganization.WorkersCount; i++) { var actor = PersonAgent.CreateInstance(this, MainOrganization.Templates.Human); actor.GroupId = group.AgentId; var email = EmailEntity.CreateInstance(MainOrganization.ArtifactNetwork, MainOrganization.Models); ActorResource.CreateInstance(MainOrganization.ArtifactNetwork.ActorResource, actor.AgentId, email.EntityId, new ResourceUsage(0)); ActorOrganization.CreateInstance(MainOrganization.ArtifactNetwork.ActorOrganization, actor.AgentId, group.AgentId); } }