Exemple #1
0
    public MonsterSpawnerController(MonsterSpawnerView view, GoldManagerController goldManagerController, WaveService waveService) : base(view)
    {
        this.goldManagerController = goldManagerController;

        wavesData            = new LevelOneWavesData();
        monsterSpawnCooldown = new Cooldown(WavesData.MONSTER_SPAWN_INTERVAL);
        waveSpawnCooldown    = new Cooldown(WavesData.WAVE_SPAWN_INTERVAL);
        this.waveService     = waveService;
    }
Exemple #2
0
    void Start()
    {
        GoldManager goldManager = new GoldManager(150, new RegularPriceList());

        goldManagerController = new GoldManagerController(goldManager, goldManagerView);

        WaveService waveService = new WaveService(goldManager);

        spawnerController = new MonsterSpawnerController(spawnerView, goldManagerController, waveService);

        TowerSpawner towerSpawner = new TowerSpawner();

        towerSpawnerController      = new TowerSpawnerController(towerSpawner, towerSpawnerView, goldManagerController);
        towerSpawnerView.Controller = towerSpawnerController;
        towerSpawnerController.SelectTower(TowerType.EARTH_TOWER);
    }