예제 #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
        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);
 }