コード例 #1
0
 public InfanteryMindProcessor(IOrientationService orientationService, IPathfindingService pathfindingService, IEventAgent eventAgent, IHeatMapService heatMapService)
 {
     _orientationService = orientationService;
     _pathfindingService = pathfindingService;
     _eventAgent = eventAgent;
     _heatMapService = heatMapService;
 }
コード例 #2
0
ファイル: AiAgent.cs プロジェクト: Ostblock/Ostzone
 public AiAgent(IComponentService componentService, IProductionManager productionManager, IMovementService movementService, InfanteryMindStateService infanteryMindStateService, IHeatMapService heatMapService)
 {
     ComponentService = componentService;
     ProductionManager = productionManager;
     MovementService = movementService;
     InfanteryMindStateService = infanteryMindStateService;
     HeatMapService = heatMapService;
 }
コード例 #3
0
ファイル: MovementService.cs プロジェクト: Ostblock/Ostzone
        public MovementService(IComponentService componentService, IEventAgent eventAgent
            , IOrientationService orientationService, InfanteryMindStateService infanteryMindStateService, IHeatMapService heatMapService)
        {
            _componentService = componentService;

            _eventAgent = eventAgent;
            _orientationService = orientationService;
            _infanteryMindStateService =infanteryMindStateService;
            _heatMapService = heatMapService;
            _infanteryMindProcessor = new InfanteryMindProcessor(_orientationService, new PathfindingService(), _eventAgent,_heatMapService);
        }
コード例 #4
0
        public InfanteryMindStateService(AiEventProcessor aiEventProcessor,IHeatMapService heatMapService, IComponentService componentService)
        {
            _aiEventProcessor = aiEventProcessor;
            _heatMapService = heatMapService;
            _componentService = componentService;

            InfanteryMinds = new ConcurrentMemoryStore<string, InfanteryMind>();
            _aiEventProcessor.OnMoveCompleted += _aiEventProcessor_OnMoveCompleted;

            _aiEventProcessor.OnUnitUnderAttack += _aiEventProcessor_OnUnitUnderAttack;
        }
コード例 #5
0
 public ArtificialIntelligenceNhu(IEventAgent eventAgent, string id)
     : base(eventAgent, id)
 {
     ComponentService = new ComponentService();
     EventProcessor = new AiEventProcessor(ComponentService);
     OrientationService = new OrientationService(new Vector2(0,0),ComponentService);
     var productionManager = new ProductionManager(ComponentService, new ProductionFacilityProvider(ComponentService), OrientationService,eventAgent, id);
     HeatMapService = new HeatMapService(new HeatPortionCalculationService(),new Vector2(800,800));
     HeatMapService.Initialize();
     InfanteryMindStateService = new InfanteryMindStateService(EventProcessor as AiEventProcessor,HeatMapService,ComponentService);
     var movementService = new MovementService(ComponentService, EventAgent, OrientationService, InfanteryMindStateService,HeatMapService);
     Agent = new AiAgent(ComponentService, productionManager, movementService, InfanteryMindStateService, HeatMapService);
 }