コード例 #1
0
    public GameplayController(ILevelSetter levelSetter, IEnemyController enemyController, IHealthController healthController, IGoldController goldController, ITowerController towerController, IObjectPooler objectPooler)
    {
        _levelSetter      = levelSetter;
        _enemyController  = enemyController;
        _healthController = healthController;
        _goldController   = goldController;
        _towerController  = towerController;
        _objectPooler     = objectPooler;

        _healthController.HealthIsZero += EndGame;
    }
コード例 #2
0
 public void SetCallbacks(IGoldController goldController)
 {
     goldController.GoldChanged += SetGold;
 }
コード例 #3
0
 public TowerController(IObjectPooler objectPooler, IGoldController goldController)
 {
     _goldController = goldController;
     _objectPooler   = objectPooler;
     _objectPooler.NewObjectCreated += SubscribeToNewTowers;
 }