public void Add(int k, ArenaParametersProto arena) { if (k < numberOfArenas) { if (!configurations.ContainsKey(k)) { configurations.Add(k, new ArenaConfiguration(arena)); } else { if (arena.ToString() != configurations[k].protoString) { configurations[k] = new ArenaConfiguration(arena); } } } }
public ArenaConfiguration(ArenaParametersProto proto) { T = proto.T; spawnables = new List <Spawnable>(); foreach (ArenaParametersProto.Types.ItemsToSpawn item in proto.Items) { spawnables.Add(new Spawnable(item)); } List <int> blackouts = new List <int>(); foreach (int blackout in proto.Blackouts) { blackouts.Add(blackout); } lightsSwitch = new LightsSwitch(T, blackouts); toUpdate = true; protoString = proto.ToString(); }