public void Init(GameState s, GCInitArgs args) { DevConsole.OnNewCommand += OnDevCommand; tbFOWCalculations.ClearTasks(); for (int ti = 0; ti < s.activeTeams.Length; ti++) { tbFOWCalculations.AddTask(new FOWTask(s, s.activeTeams[ti].Index)); } pathfinder = new Pathfinder(s); vManager = new WorldManager(s.VoxState); // Add All Tasks foreach (var at in s.activeTeams) { foreach (var unit in at.Team.Units) { AddTask(s, unit); } foreach (var building in at.Team.Buildings) { AddTask(s, building); } foreach (var squad in at.Team.Squads) { AddTask(s, squad); } } // Start The Game Type Controller s.scrGTC = s.Scripts[args.GameTypeScript]; s.gtC = s.scrGTC.CreateInstance <ACGameTypeController>(); s.gtC.Load(s, new FileInfo(s.LevelGrid.InfoFile).Directory); }