public LaxmarPlayerBase(string name, string webSocketUrl, IPathFindingService pathFindingService, JsonSerializerSettings serializerSettings = null)
 {
     Name = name;
     SerializerSettings   = serializerSettings;
     WebSocket            = new WebSocket("ws://localhost:8000");
     WebSocket.OnMessage += OnMessageHandler;
     PathFindingService   = pathFindingService;
 }
Esempio n. 2
0
 public NavigationRoutingServiceImpl(
     IRouteSegmentationService routeSegmentationService,
     INavigationCostGeneratorService navigationCostGeneratorService,
     IPathFindingService pathFindingService)
 {
     _routeSegmentationService       = routeSegmentationService;
     _navigationCostGeneratorService = navigationCostGeneratorService;
     _pathFindingService             = pathFindingService;
 }
Esempio n. 3
0
        public HallwayService(Random random, Settings settings, IPathFindingService pathFindingService)
        {
            this.random             = random;
            this.pathFindingService = pathFindingService;

            var       dungeonWidth  = settings.GridSettings.Width / settings.TileSettings.Size;
            var       dungeonHeight = settings.GridSettings.Height / settings.TileSettings.Size;
            const int wallThickness = 1;

            doorPositionBoundary = new Boundary(wallThickness, dungeonWidth - 2 * wallThickness, wallThickness, dungeonHeight - 2 * wallThickness);
        }
Esempio n. 4
0
        public EnemyAutonomous(Game game, IPathFindingService pathFindingService, Vector2 startPosition, bool isBoss)
            : base(game)
        {
            this.Position = startPosition;
            this.isBoss = isBoss;
            this.Health = 100;

            this.pathFindingService = pathFindingService;

            this.behaviourStrategySeek = new BehaviourStrategySeek();
            this.behaviourStrategyFlee = new BehaviourStrategyFlee();

            this.Game.Components.Add(this);

            this.weapon = new WeaponEnemyA(this.Game); // Todo: Factory
            this.Game.Components.Add(this.weapon);
        }