public override AIBrain GetBrain(AIContext context, AIControllersRepository controllersRepository) { return(new GroundShooterBrain(context, controllersRepository, new GroundAgentBrain.BrainParams { MinTravelDistance = _minTravelDistance, MaxTravelDistance = _maxTravelDistance, NotPlayerMask = _noPlayerMask, AttackRange = _attackRange, })); }
public override AIBrain GetBrain(AIContext context, AIControllersRepository controllersRepository) { return(new GroundChargerBrain(context, controllersRepository, new GroundAgentBrain.BrainParams { NotPlayerMask = _notPlayerMask, MinTravelDistance = _minTravelDistance, MaxTravelDistance = _maxTravelDistance, AttackRange = _attackRange, Gravity = _gravity })); }
private void Awake() { var agent = gameObject; _context = new AIContext { raycastOrigin = _raycastOrigin, player = GameObject.FindWithTag("Player") }; _controllersRepository = new AIControllersRepository(agent); _brain = _brainAsset.GetBrain(_context, _controllersRepository); }
public GroundChargerBrain(AIContext context, AIControllersRepository controllersRepository, BrainParams @params) : base(context, controllersRepository, @params) { }
public void Execute(AIControllersRepository controllersRepository) { controllersRepository.GetComponent <AIGroundChargeAttack>().StartAttacking(Player); }
public void Execute(AIControllersRepository controllersRepository) { var movementController = controllersRepository.GetComponent <AIMovement>(); movementController.Move(Direction); }
public abstract AIBrain GetBrain(AIContext context, AIControllersRepository controllersRepository);
protected AIBrain(AIContext context, AIControllersRepository controllersRepository) { _controllersRepository = controllersRepository; Context = context; }
public void Execute(AIControllersRepository controllersRepository) { var controller = controllersRepository.GetComponent <AIShootingBehaviour>(); controller.Shoot(Direction); }