public TankController(IPlayStyle playstyle) { this.playstyle = playstyle; csai = CSAI.GetInstance(); aicallback = csai.aicallback; logfile = LogFile.GetInstance(); unitdefhelp = new UnitDefHelp(aicallback); unitcontroller = UnitController.GetInstance(); enemycontroller = EnemyController.GetInstance(); buildtable = BuildTable.GetInstance(); enemyselector = new EnemySelector(110, false, false); attackpackcoordinator = new AttackPackCoordinator(TankDefsById); spreadsearchpackcoordinator = new SpreadSearchPackCoordinator(TankDefsById); movetopackcoordinator = new MoveToPackCoordinator(TankDefsById); guardpackcoordinator = new GuardPackCoordinator(TankDefsById); packcoordinatorselector = new PackCoordinatorSelector(); packcoordinatorselector.LoadCoordinator(attackpackcoordinator); packcoordinatorselector.LoadCoordinator(spreadsearchpackcoordinator); packcoordinatorselector.LoadCoordinator(movetopackcoordinator); packcoordinatorselector.LoadCoordinator(guardpackcoordinator); logfile.WriteLine("*TankController Initialized*"); }
public TankController( IPlayStyle playstyle ) { this.playstyle = playstyle; csai = CSAI.GetInstance(); aicallback = csai.aicallback; logfile = LogFile.GetInstance(); unitdefhelp = new UnitDefHelp( aicallback ); unitcontroller = UnitController.GetInstance(); enemycontroller = EnemyController.GetInstance(); buildtable = BuildTable.GetInstance(); enemyselector = new EnemySelector( 110, false, false ); attackpackcoordinator = new AttackPackCoordinator( TankDefsById ); spreadsearchpackcoordinator = new SpreadSearchPackCoordinator( TankDefsById ); movetopackcoordinator = new MoveToPackCoordinator( TankDefsById ); guardpackcoordinator = new GuardPackCoordinator( TankDefsById ); packcoordinatorselector = new PackCoordinatorSelector(); packcoordinatorselector.LoadCoordinator( attackpackcoordinator ); packcoordinatorselector.LoadCoordinator( spreadsearchpackcoordinator ); packcoordinatorselector.LoadCoordinator( movetopackcoordinator ); packcoordinatorselector.LoadCoordinator( guardpackcoordinator ); logfile.WriteLine( "*TankController Initialized*" ); }