public virtual void AddController(IController plr) { for (int i = 0; i < controllers.Count + 1; i++) { if (!controllers.ContainsKey(i)) { controllers[i] = new TimedController(CompiledConfig, plr); controllers[i].NewMatch(); controllers[i].Match = new MatchConfig(CompiledConfig); ApplyEvent(new MatchAddPlayerEvent(i, controllers[i].GetAttribute<NameAttribute>().ToString())); return; } } }
public virtual void AddController(IController plr) { for (int i = 0; i < controllers.Count + 1; i++) { if (!controllers.ContainsKey(i)) { controllers[i] = new TimedController(CompiledConfig, plr); controllers[i].NewMatch(); controllers[i].Match = new MatchConfig(CompiledConfig); ApplyEvent(new MatchAddPlayerEvent(i, controllers[i].GetAttribute <NameAttribute>().ToString())); return; } } }