public override void AddToNetwork(MemoryNetwork network) { if (Value == string.Empty) { return; } if (!network.Agents.ContainsKey(Value)) { network.Agents.Add(Value, (new AgentContext(), new HashSet <Cube>())); } var(_, cubes) = network.Agents[Value]; if (cubes.Contains(this)) { return; } cubes.Add(this); base.AddToNetwork(network); }
public override void AddToNetwork(MemoryNetwork network) { if (Value == string.Empty) { return; } HashSet <Rectangle>?cubes; if (!network.Actions.ContainsKey(Value)) { network.Actions.Add(Value, new HashSet <Rectangle>()); } cubes = network.Actions[Value]; if (cubes.Contains(this)) { return; } cubes.Add(this); base.AddToNetwork(network); }
public override void AddToNetwork(MemoryNetwork xmlNode) { xmlNode.TempRelations.Add(this); }