Ejemplo n.º 1
0
        private Action <int> _enemyCallback;                                 // Callback for notifying enemy death

        // Initialize and cache references, spawn player and enemies
        public void Init(Map map_, Movement movement_, Movement enemeyMovement_, ExplosionManager explosionManager_,
                         Action <GameState> playerCallback_, Action <int> enemyCallback_)
        {
            _map              = map_;
            _movement         = movement_;
            _enemyMovement    = enemeyMovement_;
            _explosionManager = explosionManager_;
            _playerCallback   = playerCallback_;
            _enemyCallback    = enemyCallback_;
            SetEntities();
            SpawnEntities();
        }
Ejemplo n.º 2
0
 public void Init(Movement movement_, ExplosionManager explosionManger_)
 {
     _movement        = movement_;
     _explosionManger = explosionManger_;
     _trans           = gameObject.GetComponent <Transform>();
 }