예제 #1
0
        public ActiveGhostState(Ghost context, IPlayerService playerService, IMapService mapService, IPlayerDeathMediator playerDeathMediator) : base(context)
        {
            _playerService = playerService;

            _mapService          = mapService;
            _playerDeathMediator = playerDeathMediator;
            _mapService.LoadMap();
        }
예제 #2
0
 public BombService(IHubContext <UserHub> hubContext, IMapService mapService, IPlayerService playerService, IPlayerDeathMediator playerDeathMediator, IEnemyMovementService enemyMovementService)
 {
     bombs = new List <BombDTO>();
     destructableObstacles = MapConstants.GetDestructableObstacles();
     _hubContext           = hubContext;
     this.mapService       = mapService;
     _playerService        = playerService;
     _playerDeathMediator  = playerDeathMediator;
     _enemyMovementService = enemyMovementService;
 }
예제 #3
0
        public EnemyMovementService(
            IHubContext <UserHub> hubContext,
            IPlayerService playerService,
            IMapService mapService,
            IPlayerDeathMediator playerDeathMediator)
        {
            _hubContext          = hubContext;
            _playerService       = playerService;
            _mapService          = mapService;
            _playerDeathMediator = playerDeathMediator;

            _ghost = new Ghost {
                X = Ghost.StartingX, Y = Ghost.StartingY
            };
            _ghost.State = new InactiveGhostState(_ghost, playerService, mapService, playerDeathMediator);

            UpdateGhostMovement();
        }
예제 #4
0
 public DeadGhostState(Ghost context, IPlayerService playerService, IMapService mapService, IPlayerDeathMediator playerDeathMediator) : base(context)
 {
     _playerService       = playerService;
     _mapService          = mapService;
     _playerDeathMediator = playerDeathMediator;
 }