예제 #1
0
    public TargetingManager Clone()
    {
        var tm = new TargetingManager(_initial);

        tm._targetingList.InsertRange(0, this._targetingList);
        return(tm);
    }
예제 #2
0
 void Start()
 {
     player           = GameObject.FindGameObjectWithTag("Player");
     UIManager        = GameObject.Find("UIManager");
     targetingManager = GameObject.Find("TargetingSystem").GetComponent <TargetingManager>();
     playerCam        = GameObject.Find("PlayerCamPos").GetComponent <csPlayerCamManager>();
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     player           = GameObject.Find("Player").GetComponent <csPlayerMovement>();
     playerModel      = GameObject.FindGameObjectWithTag("PlayerModel");
     targetingManager = GameObject.Find("TargetingSystem").GetComponent <TargetingManager>();
     defaultHandlePos = joystickHandle.transform.position;
 }
예제 #4
0
    // Start is called before the first frame update
    void Start()
    {
        _targetingManager = GameObject.FindGameObjectWithTag("|TargetingManager|").GetComponent <TargetingManager>();

        _worldActorMovement = GetComponent <WorldActorMovement>();

        CreateColliders();
    }
예제 #5
0
파일: Gun.cs 프로젝트: benrosen/RTS
 void Start()
 {
     targetingManager = GetComponent<TargetingManager> ();
     intervalManager = GetComponent<IntervalManager> ();
     proximityManager = GetComponent<ProximityManager> ();
     lastIntervalStartTime = Time.time;
     lastFireTime = 1000000000;
 }
예제 #6
0
    public void LinearLockOn(
        int numberOfShots,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(firePoint);

        GenericStream(tm, numberOfShots, timeBetweenShots, () => bulletSpeed);
    }
예제 #7
0
    public void Linear(
        Vector2 startingDirection,
        int numberOfShots,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(startingDirection);

        GenericStream(tm, numberOfShots, timeBetweenShots, () => bulletSpeed);
    }
예제 #8
0
    public void FourDiagonals(
        Vector2 mainDirection,
        int numberOfShotsPerDiagonal,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(mainDirection);

        NwaySpread(tm, 4, numberOfShotsPerDiagonal, 270, timeBetweenShots, bulletSpeed);
    }
예제 #9
0
    public void SpreadSevenWayLockOn(
        int numberOfShotsPerWay,
        float amplitude,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(firePoint);

        NwaySpread(tm, 7, numberOfShotsPerWay, amplitude, timeBetweenShots, bulletSpeed);
    }
예제 #10
0
    public void EightWayAllRange(
        Vector2 mainDirection,
        int numberOfShotsPerWay,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(mainDirection);

        NwaySpread(tm, 8, numberOfShotsPerWay, 315, timeBetweenShots, bulletSpeed);
    }
예제 #11
0
    public void RandomGauss(
        Vector2 startingDirection,
        float amplitudeDegrees,
        int numberOfShots,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(startingDirection).RandomizeGauss(amplitudeDegrees);

        GenericStream(tm, numberOfShots, timeBetweenShots, () => bulletSpeed);
    }
예제 #12
0
    public void SpreadNineWay(
        Vector2 mainDirection,
        int numberOfShotsPerWay,
        float amplitude,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var tm = new TargetingManager(mainDirection);

        NwaySpread(tm, 9, numberOfShotsPerWay, amplitude, timeBetweenShots, bulletSpeed);
    }
예제 #13
0
    private void Awake()
    {
        //Initialize the correct UnitType, and place it in variable thisUnit
        unitContainer = FindObjectOfType <UnitTypeContainer>();
        unitTypes     = unitContainer.unitTypes;
        for (int i = 0; i < unitTypes.Count; i++)
        {
            if (unitTypes[i].unitTypeName.Equals(unitTypeName))
            {
                thisUnit = unitTypes[i]; break;
            }
        }                                                                                                                                     //Basic For-loop to find the correct UnitType from container

        //Initialize the UnitType stats to this instance
        health          = thisUnit.health;
        attackPower     = thisUnit.attackPower;
        attackPerSecond = thisUnit.attackPerSecond;
        baseSpeed       = thisUnit.baseSpeed;
        sizeRadius      = thisUnit.sizeRadius;
        attackRadius    = thisUnit.attackRadius;
        aggroRadius     = thisUnit.aggroRadius;
        targets         = thisUnit.targets;
        characteristcs  = thisUnit.characteristcs;

        //Initialize some private stats as well:
        attackRad   = attackRadius;     //The tolrance distance for when the enemy starts "Attacking" the target instead of "Navigating" towards it.
        reachRad    = attackRad * 1.2f; //Once the "Attacking" has started, we need to enlargen the attackDiameter, so that there won't occur any "following jitter", where the unit stops, but has to start navigating agian, because the enemy is out-of-reach on the next update.
        attackTimer = attackPerSecond;

        //Initialize the NavMeshAgent and assign stats to the agent's parameters
        agent        = GetComponent <NavMeshAgent>();
        agent.speed  = baseSpeed;
        agent.radius = sizeRadius;

        //Assert the correct player id:
        thisPlayer  = GetComponentInParent <PlayerID>().playerID;
        enemyPlayer = (thisPlayer == 1) ? 2 : 1;

        //Assert the correct TargetInformation to this unit
        targetInfo = GetComponent <UnitTargetInfo>();
        targetInfo.SetTargetEnum(targets);
        targetInfo.SetCharacteristicsEnum(characteristcs);

        //Add the unit's Transform to the current battlefield units Hashset:
        targetManager = FindObjectOfType <TargetingManager>();
        targetManager.RegisterUnit(gameObject.transform, thisPlayer);

        //Initialize the Unit States, so the game will orient the unit correctly starting from Update()
        currentState  = AIstate.NoState;
        previousState = AIstate.NoState;

        AudioFW.Play("Unit_Knight_Ready");
    }
예제 #14
0
파일: BaseActor.cs 프로젝트: reZach/rpgwars
    /// <summary>
    /// To be called in a child class's Start() method.
    /// </summary>
    protected void Initialize()
    {
        _navMeshAgent     = GetComponent <NavMeshAgent>();
        _startPosition    = this.transform.position;
        _targetingManager = GameObject.FindGameObjectWithTag("|TargetingManager|").GetComponent <TargetingManager>();
        HoldingItem       = GetComponentInChildren <BaseHoldable>();

        MaxHealth = Health = StartingHealth;
        MaxEnergy = Energy = StartingEnergy;
        Guid      = new Guid();

        CreateColliders();
    }
        /// <summary>
        /// Manages all aspects of Planetary Invasion.
        /// </summary>
        /// <param name="Content">Content Manager</param>
        /// <param name="planetLevel">Level to play on.</param>
        public PlanetStateManager(SpriteBatch spriteBatch,
                                  ClientManager clientManager,
                                  HudElementManager hudElementManager,
                                  ParticleManager particleManager,
                                  PhysicsManager physicsManager,
                                  ProjectileManager projectileManager,
                                  ShipManager shipManager,
                                  TextureManager textureManager,
                                  WarpHoleManager warpHoleManager,
                                  SpaceStateManager spaceStateManager,
                                  MessageManager messageManager,
                                  IBus bus,
                                  DebugTextManager debugTextManager,
                                  TargetingManager targetManager,
                                  TeamManager teamManager,
                                  ConfigPlanetStateUI uiConfig,
                                  GameWindow window)

            : base(particleManager, physicsManager, targetManager, teamManager)
        {
            _clientManager     = clientManager;
            _spriteBatch       = spriteBatch;
            _hudElementManager = hudElementManager;
            _shipManager       = shipManager;
            _textureManager    = textureManager;
            _projectileManager = projectileManager;
            _warpHoleManager   = warpHoleManager;
            _spaceStateManager = spaceStateManager;
            _messageManager    = messageManager;
            _bus = bus;
            _debugTextManager = debugTextManager;
            _UI = new PlanetStateUI(uiConfig, shipManager.GetPlayerEnergy);

            _UI.RegisterInstructionCallback("ToggleColonizeMode", ToggleColonizeMode);
            _UI.RegisterInstructionCallback("TurretClicked", ToggleStructurePlacementMode);
            _UI.RegisterInstructionCallback("MissileClicked", _UIFireAmbassador);

            Turrets = new List <Turret>();

            Camera      = new Camera2D();
            updateWatch = new Stopwatch();
            drawWatch   = new Stopwatch();
            Windows     = new List <BaseUI>();
            Camera.Zoom = 1f;

            PotentialTurretTargets = new Dictionary <int, ITargetable>();

            _bus.Subscribe(this);

            this.OnStructureRemoved += PlanetStateManager_OnStructureRemoved;
        }
예제 #16
0
    public void RandomSpeedAndSpread(
        Vector2 principalDirection,
        int numberOfShots,
        float amplitudeDegrees,
        float minimumSpeed,
        float maximumSpeed
        )
    {
        var tm = new TargetingManager(principalDirection).RandomizeUniform(amplitudeDegrees);

        float RandomizeSpeed() => Random.Range(minimumSpeed, maximumSpeed);

        GenericStream(tm, numberOfShots, 0, RandomizeSpeed);
    }
예제 #17
0
    void Awake()
    {
        MapManager        = GetComponent <MapManager>();
        CameraManager     = GetComponent <CameraManager>();
        ProjectionManager = GetComponent <ProjectionManager>();
        CombatUIManager   = GameObject.Find("CombatUI").GetComponent <CombatUIManager>();
        TargetingManager  = GetComponent <TargetingManager>();

        if (SaveManager.CheckValidFileSave(Scene.Battleground))
        {
            BattlegroundData = SaveManager.LoadBattleground();
        }

        MapManager.GenerateMaps(BattlegroundData.MapInfos);
    }
예제 #18
0
        public SpaceStateManager(IBus bus,
                                 ContentManager Content,
                                 GraphicsDeviceManager graphics,
                                 SpriteBatch spriteBatch,
                                 ChatManager chatManager,
                                 HudElementManager hudElementManager,
                                 ParticleManager particleManager,
                                 PhysicsManager physicsManager,
                                 ProjectileManager projectileManager,
                                 ShipManager shipManager,
                                 SpaceManager spaceManager,
                                 WarpHoleManager warpholeManager,
                                 TextureManager textureManager,
                                 TargetingManager targetManager,
                                 TeamManager teamManager,
                                 ConfigSpaceStateUI uiConfig)
            : base(particleManager, physicsManager, targetManager, teamManager)
        {
            State              = GameStates.loading;
            _bus               = bus;
            _spaceManager      = spaceManager;
            _chatManager       = chatManager;
            _hudElementManager = hudElementManager;
            _physicsManager    = physicsManager;
            _projectileManager = projectileManager;
            _shipManager       = shipManager;
            _spriteBatch       = spriteBatch;
            _warpholeManager   = warpholeManager;
            _textureManager    = textureManager;
            _UI = new SpaceStateUI(uiConfig, uiConfig.GameWindow, shipManager.GetPlayerEnergy);



            _UI.RegisterInstructionCallback("TurretClicked", ToggleStructurePlacementMode);
            _UI.RegisterInstructionCallback("MissileClicked", _UIFireAmbassador);



            rotationalCamera = new RotationalCamera(chatManager);
            Camera           = new Camera2D();

            Windows = new List <BaseUI>();

            _bus.Subscribe(this);

            State = GameStates.updating;
        }
    public void TargeterIsUpdated()
    {
        //Arrange
        ITargeter targeter = Substitute.For <ITargeter>();

        Container.Bind <ITargeter>().FromInstance(targeter);
        ICursor cursor = Substitute.For <ICursor>();

        Container.Bind <ICursor>().FromInstance(cursor);
        TargetingManager tMan = Container.Resolve <TargetingManager>();

        //Act
        tMan.Tick();

        //Assert
        targeter.Received(1).AcquireTarget();
    }
예제 #20
0
    public void SineWave(
        Vector2 principalDirection,
        float amplitude,
        int numberOfShots,
        float wavelength,
        float timeBetweenShots,
        float principalDirectionBulletSpeed,
        bool flip = false
        )
    {
        var period = wavelength / principalDirectionBulletSpeed;
        var tm     = new TargetingManager(principalDirection);

        void Callback(Bullet bullet) => bullet.Sine(amplitude, period, flip);

        GenericStream(tm, numberOfShots, timeBetweenShots, () => principalDirectionBulletSpeed, Callback);
    }
예제 #21
0
    public void GenericStream(
        TargetingManager tm,
        int numberOfShots,
        float timeBetweenShots,
        Func <float> bulletSpeed,
        Action <Bullet> callback = null
        )
    {
        var shotsFired   = 0;
        var lastShotTime = Time.time - timeBetweenShots;

        shootingFuncs.Add((() =>
        {
            while (Time.time > lastShotTime + timeBetweenShots && shotsFired < numberOfShots)
            {
                lastShotTime += timeBetweenShots;
                ++shotsFired;
                var dir = tm.Target().normalized;
                var obj = Instantiate(bulletPrefab, firePoint.position, GameplayStatics.GetRotationFromDir(dir));
                var bullet = obj.GetComponent <Bullet>();
                var bs = bulletSpeed();
                bullet.rb.velocity = dir * bs;
                bullet.targetTag = targetTag;
                bullet.maxSpeed = bs;
                bullet.SetInstantiator(owner);
                if (_homingRotational)
                {
                    bullet.HomeRotational(_homingTarget, _homingDegreesPerSecond);
                }
                else if (_homingDirectional)
                {
                    bullet.HomeDirectional(_homingTarget, _homingAcceleration);
                }

                if (_willDisappear)
                {
                    bullet.DisappearIn = _disappearIn;
                }

                callback?.Invoke(bullet);
            }

            return(shotsFired >= numberOfShots);
        }));
    }
예제 #22
0
    public void NwaySpread(
        TargetingManager tm,
        int numberOfStreams,
        int numberOfShotsPerStream,
        float amplitude,
        float timeBetweenShots,
        float bulletSpeed
        )
    {
        var starter = -amplitude / 2.0f;
        var step    = amplitude / (numberOfStreams - 1);

        for (var i = 0; i < numberOfStreams; i++)
        {
            var localTM = tm.Clone().Offset(starter + step * i);
            GenericStream(localTM, numberOfShotsPerStream, timeBetweenShots, () => bulletSpeed);
        }
    }
예제 #23
0
        private static async Task <bool> TankTask()
        {
            if (Me.IsDead || Me.IsMounted)
            {
                return(false);
            }

            if (Me.InCombat || Target != null && TargetConverted && ConvertedTarget().TaggerType != 0)
            {
                return(await BrainBehavior.CombatLogic.ExecuteCoroutine());
            }

            if (!Me.InCombat)
            {
                if (RoutineManager.Current.RestBehavior != null)
                {
                    await RoutineManager.Current.RestBehavior.ExecuteCoroutine();
                }

                if (RoutineManager.Current.PreCombatBuffBehavior != null)
                {
                    await RoutineManager.Current.PreCombatBuffBehavior.ExecuteCoroutine();
                }

                if (RoutineManager.Current.HealBehavior != null)
                {
                    await RoutineManager.Current.HealBehavior.ExecuteCoroutine();
                }

                if (RoutineManager.Current.PullBuffBehavior != null && TargetingManager.IsValidEnemy(Core.Player.CurrentTarget))
                {
                    await RoutineManager.Current.PullBuffBehavior.ExecuteCoroutine();
                }

                if (Me.CurrentTarget != null)
                {
                    if (RoutineManager.Current.PullBehavior != null && MainSettingsModel.Instance.UsePull && TargetingManager.IsValidEnemy(Core.Player.CurrentTarget) && Core.Player.CurrentTarget.Location.Distance3D(Core.Player.Location) <= RoutineManager.Current.PullRange + Core.Player.CurrentTarget.CombatReach)
                    {
                        return(await RoutineManager.Current.PullBehavior.ExecuteCoroutine());
                    }
                }
            }
            return(false);
        }
예제 #24
0
    public void Spiral(
        Vector2 startingDirection,
        int numberOfShotsPerLoop,
        float timeToSpiralOnce,
        int loops,
        float bulletSpeed, bool inverted = false
        )
    {
        var angleCte = 360.0f;

        if (inverted)
        {
            angleCte = -angleCte;
        }

        var angle         = angleCte / ((float)numberOfShotsPerLoop / loops);
        var shootInterval = timeToSpiralOnce / numberOfShotsPerLoop;
        var tm            = new TargetingManager(startingDirection).Spiral(angle);

        GenericStream(tm, numberOfShotsPerLoop * loops, shootInterval, () => bulletSpeed);
    }
예제 #25
0
    private void Awake()
    {
        //Initialize the correct UnitType, and place it in variable thisUnit
        unitContainer = FindObjectOfType <UnitTypeContainer>();
        unitTypes     = unitContainer.unitTypes;
        for (int i = 0; i < unitTypes.Count; i++)
        {
            if (unitTypes[i].unitTypeName.Equals(unitTypeName))
            {
                thisUnit = unitTypes[i]; break;
            }
        }                                                                                                                                     //Basic For-loop to find the correct UnitType from container

        //Initialize the UnitType stats to this instance
        health          = thisUnit.health;
        attackPower     = thisUnit.attackPower;
        attackPerSecond = thisUnit.attackPerSecond;
        baseSpeed       = thisUnit.baseSpeed;
        sizeRadius      = thisUnit.sizeRadius;
        attackRadius    = thisUnit.attackRadius;
        aggroRadius     = thisUnit.aggroRadius;
        targets         = thisUnit.targets;
        characteristcs  = thisUnit.characteristcs;

        //Assert the correct player id:
        thisPlayer  = GetComponentInParent <PlayerID>().playerID;
        enemyPlayer = (thisPlayer == 1) ? 2 : 1;

        //Assert the correct TargetInformation to this unit
        targetInfo = GetComponent <UnitTargetInfo>();
        targetInfo.SetTargetEnum(targets);
        targetInfo.SetCharacteristicsEnum(characteristcs);

        //Add the unit's Transform to the current battlefield units Hashset:
        targetManager = FindObjectOfType <TargetingManager>();

        AudioFW.Play("Unit_Fireball_Crash");
    }
예제 #26
0
        public DefaultSharkyBot(GameConnection gameConnection)
        {
            var debug = false;

#if DEBUG
            debug = true;
#endif

            var framesPerSecond = 22.4f;

            SharkyOptions = new SharkyOptions {
                Debug = debug, FramesPerSecond = framesPerSecond, TagsEnabled = true
            };
            MacroData  = new MacroData();
            AttackData = new AttackData {
                ArmyFoodAttack = 30, ArmyFoodRetreat = 25, Attacking = false, UseAttackDataManager = true, CustomAttackFunction = true, RetreatTrigger = 1f, AttackTrigger = 1.5f
            };
            TargetingData = new TargetingData {
                HiddenEnemyBase = false
            };
            BaseData       = new BaseData();
            ActiveChatData = new ActiveChatData();
            EnemyData      = new EnemyData();
            SharkyUnitData = new SharkyUnitData();

            UnitDataService = new UnitDataService(SharkyUnitData);

            Managers = new List <IManager>();

            DebugService = new DebugService(SharkyOptions);
            DebugManager = new DebugManager(gameConnection, SharkyOptions, DebugService);
            Managers.Add(DebugManager);

            UpgradeDataService  = new UpgradeDataService();
            BuildingDataService = new BuildingDataService();
            TrainingDataService = new TrainingDataService();
            AddOnDataService    = new AddOnDataService();
            MorphDataService    = new MorphDataService();
            WallDataService     = new WallDataService();

            UnitDataManager = new UnitDataManager(UpgradeDataService, BuildingDataService, TrainingDataService, AddOnDataService, MorphDataService, SharkyUnitData);
            Managers.Add(UnitDataManager);

            MapData               = new MapData();
            MapDataService        = new MapDataService(MapData);
            AreaService           = new AreaService(MapDataService);
            TargetPriorityService = new TargetPriorityService(SharkyUnitData);
            CollisionCalculator   = new CollisionCalculator();
            ActiveUnitData        = new ActiveUnitData();
            UnitCountService      = new UnitCountService(ActiveUnitData, SharkyUnitData);
            DamageService         = new DamageService();

            UnitManager = new UnitManager(ActiveUnitData, SharkyUnitData, SharkyOptions, TargetPriorityService, CollisionCalculator, MapDataService, DebugService, DamageService, UnitDataService);
            MapManager  = new MapManager(MapData, ActiveUnitData, SharkyOptions, SharkyUnitData, DebugService, WallDataService);
            Managers.Add(MapManager);
            Managers.Add(UnitManager);

            EnemyRaceManager = new EnemyRaceManager(ActiveUnitData, SharkyUnitData, EnemyData);
            Managers.Add(EnemyRaceManager);

            SharkyPathFinder         = new SharkyPathFinder(new Roy_T.AStar.Paths.PathFinder(), MapData, MapDataService, DebugService);
            SharkySimplePathFinder   = new SharkySimplePathFinder(MapDataService);
            SharkyAdvancedPathFinder = new SharkyAdvancedPathFinder(new Roy_T.AStar.Paths.PathFinder(), MapData, MapDataService, DebugService);
            NoPathFinder             = new SharkyNoPathFinder();
            BuildingService          = new BuildingService(MapData, ActiveUnitData, TargetingData, BaseData);
            ChokePointService        = new ChokePointService(SharkyPathFinder, MapDataService, BuildingService);
            ChokePointsService       = new ChokePointsService(SharkyPathFinder, ChokePointService);

            BaseManager = new BaseManager(SharkyUnitData, ActiveUnitData, SharkyPathFinder, UnitCountService, BaseData);
            Managers.Add(BaseManager);

            TargetingManager = new TargetingManager(SharkyUnitData, BaseData, MacroData, TargetingData, MapData, ChokePointService, ChokePointsService, DebugService);
            Managers.Add(TargetingManager);

            BuildOptions = new BuildOptions {
                StrictGasCount = false, StrictSupplyCount = false, StrictWorkerCount = false
            };
            MacroSetup       = new MacroSetup();
            WallOffPlacement = new HardCodedWallOffPlacement(ActiveUnitData, SharkyUnitData, DebugService, MapData, BuildingService, TargetingData, BaseData);
            //WallOffPlacement = new WallOffPlacement(ActiveUnitData, SharkyUnitData, DebugService, MapData, BuildingService, TargetingData);
            ProtossBuildingPlacement = new ProtossBuildingPlacement(ActiveUnitData, SharkyUnitData, DebugService, MapDataService, BuildingService, WallOffPlacement);
            TerranBuildingPlacement  = new TerranBuildingPlacement(ActiveUnitData, SharkyUnitData, DebugService, BuildingService);
            ZergBuildingPlacement    = new ZergBuildingPlacement(ActiveUnitData, SharkyUnitData, DebugService, BuildingService);
            BuildingPlacement        = new BuildingPlacement(ProtossBuildingPlacement, TerranBuildingPlacement, ZergBuildingPlacement, BaseData, ActiveUnitData, BuildingService, SharkyUnitData);
            BuildingBuilder          = new BuildingBuilder(ActiveUnitData, TargetingData, BuildingPlacement, SharkyUnitData, BaseData);

            WarpInPlacement = new WarpInPlacement(ActiveUnitData, DebugService, MapData);

            Morpher             = new Morpher(ActiveUnitData);
            BuildPylonService   = new BuildPylonService(MacroData, BuildingBuilder, SharkyUnitData, ActiveUnitData, BaseData, TargetingData, BuildingService);
            BuildDefenseService = new BuildDefenseService(MacroData, BuildingBuilder, SharkyUnitData, ActiveUnitData, BaseData, TargetingData, BuildOptions);

            ChronoData   = new ChronoData();
            NexusManager = new NexusManager(ActiveUnitData, SharkyUnitData, ChronoData);
            Managers.Add(NexusManager);
            ShieldBatteryManager = new ShieldBatteryManager(ActiveUnitData);
            Managers.Add(ShieldBatteryManager);
            PhotonCannonManager = new PhotonCannonManager(ActiveUnitData);
            Managers.Add(PhotonCannonManager);

            OrbitalManager = new OrbitalManager(ActiveUnitData, BaseData, EnemyData);
            Managers.Add(OrbitalManager);

            HttpClient         = new HttpClient();
            ChatHistory        = new ChatHistory();
            ChatDataService    = new ChatDataService();
            EnemyNameService   = new EnemyNameService();
            EnemyPlayerService = new EnemyPlayerService(EnemyNameService);
            ChatService        = new ChatService(ChatDataService, SharkyOptions, ActiveChatData);
            ChatManager        = new ChatManager(HttpClient, ChatHistory, SharkyOptions, ChatDataService, EnemyPlayerService, EnemyNameService, ChatService, ActiveChatData);
            Managers.Add((IManager)ChatManager);

            ProxyLocationService = new ProxyLocationService(BaseData, TargetingData, SharkyPathFinder, MapDataService, AreaService);

            var individualMicroController = new IndividualMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);

            var adeptMicroController           = new AdeptMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var adeptShadeMicroController      = new AdeptShadeMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var archonMicroController          = new ArchonMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.AttackForward, false);
            var colossusMicroController        = new ColossusMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false, CollisionCalculator);
            var darkTemplarMicroController     = new DarkTemplarMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var disruptorMicroController       = new DisruptorMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var disruptorPhasedMicroController = new DisruptorPhasedMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.AttackForward, false);
            var highTemplarMicroController     = new HighTemplarMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var mothershipMicroController      = new MothershipMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var oracleMicroController          = new OracleMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var observerMicroController        = new ObserverMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var phoenixMicroController         = new PhoenixMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, true);
            var sentryMicroController          = new SentryMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.StayOutOfRange, true);
            var stalkerMicroController         = new StalkerMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var tempestMicroController         = new TempestMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var voidrayMicroController         = new VoidRayMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var carrierMicroController         = new CarrierMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var warpPrismpMicroController      = new WarpPrismMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var zealotMicroController          = new ZealotMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.AttackForward, false);

            var zerglingMicroController = new ZerglingMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.AttackForward, false);

            var marineMicroController  = new MarineMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var reaperMicroController  = new ReaperMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var bansheeMicroController = new BansheeMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);

            var workerDefenseMicroController    = new IndividualMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false, 3);
            var workerProxyScoutMicroController = new WorkerScoutMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.AttackForward, false);

            var oracleHarassMicroController = new OracleMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);
            var reaperHarassMicroController = new ReaperMicroController(MapDataService, SharkyUnitData, ActiveUnitData, DebugService, SharkyAdvancedPathFinder, BaseData, SharkyOptions, DamageService, UnitDataService, TargetingData, MicroPriority.LiveAndAttack, false);

            var individualMicroControllers = new Dictionary <UnitTypes, IIndividualMicroController>
            {
                { UnitTypes.PROTOSS_ADEPT, adeptMicroController },
                { UnitTypes.PROTOSS_ADEPTPHASESHIFT, adeptShadeMicroController },
                { UnitTypes.PROTOSS_ARCHON, archonMicroController },
                { UnitTypes.PROTOSS_COLOSSUS, colossusMicroController },
                { UnitTypes.PROTOSS_DARKTEMPLAR, darkTemplarMicroController },
                { UnitTypes.PROTOSS_DISRUPTOR, disruptorMicroController },
                { UnitTypes.PROTOSS_DISRUPTORPHASED, disruptorPhasedMicroController },
                { UnitTypes.PROTOSS_HIGHTEMPLAR, highTemplarMicroController },
                { UnitTypes.PROTOSS_MOTHERSHIP, mothershipMicroController },
                { UnitTypes.PROTOSS_ORACLE, oracleMicroController },
                { UnitTypes.PROTOSS_PHOENIX, phoenixMicroController },
                { UnitTypes.PROTOSS_SENTRY, sentryMicroController },
                { UnitTypes.PROTOSS_STALKER, stalkerMicroController },
                { UnitTypes.PROTOSS_TEMPEST, tempestMicroController },
                { UnitTypes.PROTOSS_VOIDRAY, voidrayMicroController },
                { UnitTypes.PROTOSS_CARRIER, carrierMicroController },
                { UnitTypes.PROTOSS_WARPPRISM, warpPrismpMicroController },
                { UnitTypes.PROTOSS_WARPPRISMPHASING, warpPrismpMicroController },
                { UnitTypes.PROTOSS_ZEALOT, zealotMicroController },
                { UnitTypes.PROTOSS_OBSERVER, observerMicroController },

                { UnitTypes.ZERG_ZERGLING, zerglingMicroController },

                { UnitTypes.TERRAN_MARINE, marineMicroController },
                { UnitTypes.TERRAN_MARAUDER, marineMicroController },
                { UnitTypes.TERRAN_REAPER, reaperMicroController },
                { UnitTypes.TERRAN_BANSHEE, bansheeMicroController }
            };

            MicroData = new MicroData {
                IndividualMicroControllers = individualMicroControllers, IndividualMicroController = individualMicroController
            };

            DefenseService   = new DefenseService(ActiveUnitData);
            TargetingService = new TargetingService(ActiveUnitData, MapDataService, BaseData, TargetingData);
            MicroController  = new MicroController(MicroData);

            MicroTaskData = new MicroTaskData {
                MicroTasks = new Dictionary <string, IMicroTask>()
            };

            var defenseSquadTask        = new DefenseSquadTask(ActiveUnitData, TargetingData, DefenseService, MicroController, new ArmySplitter(AttackData, TargetingData, ActiveUnitData, DefenseService, MicroController), new List <DesiredUnitsClaim>(), 0, false);
            var workerScoutTask         = new WorkerScoutTask(SharkyUnitData, TargetingData, MapDataService, false, 0.5f, workerDefenseMicroController, DebugService, BaseData, AreaService);
            var workerScoutGasStealTask = new WorkerScoutGasStealTask(SharkyUnitData, TargetingData, MacroData, MapDataService, false, 0.5f, DebugService, BaseData, AreaService, MapData, BuildingService, ActiveUnitData);
            var findHiddenBaseTask      = new FindHiddenBaseTask(BaseData, TargetingData, MapDataService, individualMicroController, 15, false, 0.5f);
            var proxyScoutTask          = new ProxyScoutTask(SharkyUnitData, TargetingData, BaseData, SharkyOptions, false, 0.5f, workerProxyScoutMicroController);
            var miningDefenseService    = new MiningDefenseService(BaseData, ActiveUnitData, workerDefenseMicroController, DebugService);
            var miningTask               = new MiningTask(SharkyUnitData, BaseData, ActiveUnitData, 1, miningDefenseService, MacroData, BuildOptions);
            var queenInjectTask          = new QueenInjectsTask(ActiveUnitData, 1.1f, UnitCountService);
            var attackTask               = new AttackTask(MicroController, TargetingData, ActiveUnitData, DefenseService, MacroData, AttackData, TargetingService, MicroTaskData, new ArmySplitter(AttackData, TargetingData, ActiveUnitData, DefenseService, MicroController), new EnemyCleanupService(MicroController), 2);
            var adeptWorkerHarassTask    = new AdeptWorkerHarassTask(BaseData, TargetingData, adeptMicroController, 2, false);
            var oracleWorkerHarassTask   = new OracleWorkerHarassTask(TargetingData, BaseData, ChatService, MapDataService, MapData, oracleHarassMicroController, 1, false);
            var lateGameOracleHarassTask = new LateGameOracleHarassTask(BaseData, TargetingData, MapDataService, oracleHarassMicroController, 1, false);
            var reaperWorkerHarassTask   = new ReaperWorkerHarassTask(BaseData, TargetingData, reaperHarassMicroController, 2, false);
            var hallucinationScoutTask   = new HallucinationScoutTask(TargetingData, BaseData, false, .5f);
            var wallOffTask              = new WallOffTask(SharkyUnitData, TargetingData, ActiveUnitData, MacroData, WallOffPlacement, false, .25f);
            var destroyWallOffTask       = new DestroyWallOffTask(ActiveUnitData, false, .25f);

            MicroTaskData.MicroTasks[defenseSquadTask.GetType().Name]        = defenseSquadTask;
            MicroTaskData.MicroTasks[workerScoutGasStealTask.GetType().Name] = workerScoutGasStealTask;
            MicroTaskData.MicroTasks[workerScoutTask.GetType().Name]         = workerScoutTask;
            MicroTaskData.MicroTasks[findHiddenBaseTask.GetType().Name]      = findHiddenBaseTask;
            MicroTaskData.MicroTasks[proxyScoutTask.GetType().Name]          = proxyScoutTask;
            MicroTaskData.MicroTasks[miningTask.GetType().Name]               = miningTask;
            MicroTaskData.MicroTasks[queenInjectTask.GetType().Name]          = queenInjectTask;
            MicroTaskData.MicroTasks[attackTask.GetType().Name]               = attackTask;
            MicroTaskData.MicroTasks[adeptWorkerHarassTask.GetType().Name]    = adeptWorkerHarassTask;
            MicroTaskData.MicroTasks[oracleWorkerHarassTask.GetType().Name]   = oracleWorkerHarassTask;
            MicroTaskData.MicroTasks[lateGameOracleHarassTask.GetType().Name] = lateGameOracleHarassTask;
            MicroTaskData.MicroTasks[reaperWorkerHarassTask.GetType().Name]   = reaperWorkerHarassTask;
            MicroTaskData.MicroTasks[hallucinationScoutTask.GetType().Name]   = hallucinationScoutTask;
            MicroTaskData.MicroTasks[wallOffTask.GetType().Name]              = wallOffTask;
            MicroTaskData.MicroTasks[destroyWallOffTask.GetType().Name]       = destroyWallOffTask;

            MicroManager = new MicroManager(ActiveUnitData, MicroTaskData);
            Managers.Add(MicroManager);

            AttackDataManager = new AttackDataManager(AttackData, ActiveUnitData, attackTask, TargetPriorityService, TargetingData, MacroData, BaseData, DebugService);
            Managers.Add(AttackDataManager);

            BuildProxyService     = new BuildProxyService(MacroData, BuildingBuilder, SharkyUnitData, ActiveUnitData, Morpher, MicroTaskData);
            BuildingCancelService = new BuildingCancelService(ActiveUnitData, MacroData);
            MacroManager          = new MacroManager(MacroSetup, ActiveUnitData, SharkyUnitData, BuildingBuilder, SharkyOptions, BaseData, TargetingData, AttackData, WarpInPlacement, MacroData, Morpher, BuildOptions, BuildPylonService, BuildDefenseService, BuildProxyService, UnitCountService, BuildingCancelService);
            Managers.Add(MacroManager);

            EnemyStrategyHistory      = new EnemyStrategyHistory();
            EnemyData.EnemyStrategies = new Dictionary <string, IEnemyStrategy>
            {
                ["Proxy"]            = new EnemyStrategies.Proxy(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, TargetingData, DebugService, UnitCountService),
                ["WorkerRush"]       = new WorkerRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, TargetingData, DebugService, UnitCountService),
                ["InvisibleAttacks"] = new InvisibleAttacks(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),

                ["AdeptRush"]         = new AdeptRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),
                ["CannonRush"]        = new CannonRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, TargetingData, DebugService, UnitCountService),
                ["ProtossFastExpand"] = new ProtossFastExpand(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService, TargetingData),
                ["ProxyRobo"]         = new ProxyRobo(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService, TargetingData),
                ["ProxyStargate"]     = new ProxyStargate(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService, TargetingData),
                ["ZealotRush"]        = new ZealotRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),

                ["MarineRush"]  = new MarineRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),
                ["BunkerRush"]  = new BunkerRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, TargetingData, DebugService, UnitCountService),
                ["MassVikings"] = new MassVikings(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),
                ["ThreeRax"]    = new ThreeRax(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),

                ["ZerglingRush"] = new ZerglingRush(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService),
                ["RoachRavager"] = new RoachRavager(EnemyStrategyHistory, ChatService, ActiveUnitData, SharkyOptions, DebugService, UnitCountService)
            };

            EnemyStrategyManager = new EnemyStrategyManager(EnemyData);
            Managers.Add(EnemyStrategyManager);

            EmptyCounterTransitioner = new EmptyCounterTransitioner(EnemyData, SharkyOptions);

            var antiMassMarine   = new AntiMassMarine(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, ChronoData, EmptyCounterTransitioner, UnitCountService, MicroTaskData);
            var fourGate         = new FourGate(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, ChronoData, SharkyUnitData, EmptyCounterTransitioner, UnitCountService, MicroTaskData);
            var nexusFirst       = new NexusFirst(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, ChronoData, EmptyCounterTransitioner, UnitCountService, MicroTaskData);
            var robo             = new Robo(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, ChronoData, EnemyData, MicroTaskData, EmptyCounterTransitioner, UnitCountService);
            var protossRobo      = new ProtossRobo(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, ChronoData, SharkyOptions, MicroTaskData, EnemyData, EmptyCounterTransitioner, UnitCountService);
            var everyProtossUnit = new EveryProtossUnit(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, ChronoData, EmptyCounterTransitioner, UnitCountService, MicroTaskData);

            var protossBuilds = new Dictionary <string, ISharkyBuild>
            {
                [everyProtossUnit.Name()] = everyProtossUnit,
                [nexusFirst.Name()]       = nexusFirst,
                [robo.Name()]             = robo,
                [protossRobo.Name()]      = protossRobo,
                [fourGate.Name()]         = fourGate,
                [antiMassMarine.Name()]   = antiMassMarine
            };
            var protossSequences = new List <List <string> >
            {
                new List <string> {
                    everyProtossUnit.Name()
                },
                new List <string> {
                    nexusFirst.Name(), robo.Name(), protossRobo.Name()
                },
                new List <string> {
                    antiMassMarine.Name()
                },
                new List <string> {
                    fourGate.Name()
                }
            };
            var protossBuildSequences = new Dictionary <string, List <List <string> > >
            {
                [Race.Terran.ToString()]  = protossSequences,
                [Race.Zerg.ToString()]    = protossSequences,
                [Race.Protoss.ToString()] = protossSequences,
                [Race.Random.ToString()]  = protossSequences,
                ["Transition"]            = protossSequences
            };

            var massMarine      = new MassMarines(this);
            var battleCruisers  = new BattleCruisers(BuildOptions, MacroData, ActiveUnitData, AttackData, MicroTaskData, ChatService, UnitCountService);
            var everyTerranUnit = new EveryTerranUnit(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, MicroTaskData, UnitCountService);
            var terranBuilds    = new Dictionary <string, ISharkyBuild>
            {
                [massMarine.Name()]      = massMarine,
                [battleCruisers.Name()]  = battleCruisers,
                [everyTerranUnit.Name()] = everyTerranUnit
            };
            var terranSequences = new List <List <string> >
            {
                new List <string> {
                    massMarine.Name(), battleCruisers.Name()
                },
                new List <string> {
                    everyTerranUnit.Name()
                },
                new List <string> {
                    battleCruisers.Name()
                },
            };
            var terranBuildSequences = new Dictionary <string, List <List <string> > >
            {
                [Race.Terran.ToString()]  = terranSequences,
                [Race.Zerg.ToString()]    = terranSequences,
                [Race.Protoss.ToString()] = terranSequences,
                [Race.Random.ToString()]  = terranSequences,
                ["Transition"]            = terranSequences
            };

            var basicZerglingRush = new BasicZerglingRush(BuildOptions, MacroData, ActiveUnitData, AttackData, ChatService, MicroTaskData, UnitCountService);
            var everyZergUnit     = new EveryZergUnit(BuildOptions, MacroData, ActiveUnitData, AttackData, MicroTaskData, ChatService, UnitCountService);
            var zergBuilds        = new Dictionary <string, ISharkyBuild>
            {
                [everyZergUnit.Name()]     = everyZergUnit,
                [basicZerglingRush.Name()] = basicZerglingRush
            };
            var zergSequences = new List <List <string> >
            {
                new List <string> {
                    everyZergUnit.Name()
                },
                new List <string> {
                    basicZerglingRush.Name(), everyZergUnit.Name()
                }
            };
            var zergBuildSequences = new Dictionary <string, List <List <string> > >
            {
                [Race.Terran.ToString()]  = zergSequences,
                [Race.Zerg.ToString()]    = zergSequences,
                [Race.Protoss.ToString()] = zergSequences,
                [Race.Random.ToString()]  = zergSequences,
                ["Transition"]            = zergSequences
            };

            MacroBalancer = new MacroBalancer(BuildOptions, ActiveUnitData, MacroData, SharkyUnitData, BaseData, UnitCountService);
            BuildChoices  = new Dictionary <Race, BuildChoices>
            {
                { Race.Protoss, new BuildChoices {
                      Builds = protossBuilds, BuildSequences = protossBuildSequences
                  } },
                { Race.Terran, new BuildChoices {
                      Builds = terranBuilds, BuildSequences = terranBuildSequences
                  } },
                { Race.Zerg, new BuildChoices {
                      Builds = zergBuilds, BuildSequences = zergBuildSequences
                  } }
            };
            BuildDecisionService = new BuildDecisionService(ChatService);
            BuildManager         = new BuildManager(BuildChoices, DebugService, MacroBalancer, BuildDecisionService, EnemyPlayerService, ChatHistory, EnemyStrategyHistory);
            Managers.Add(BuildManager);
        }
예제 #27
0
 protected override List <string> Supplier()
 {
     return(TargetingManager.TargetingConditionals());
 }
예제 #28
0
 void Start()
 {
     targetingManager = GetComponent<TargetingManager> ();
 }
예제 #29
0
파일: Dps.cs 프로젝트: Fryheit/ATB_Builds
        private static async Task <bool> DpsTask()
        {
            if (Me.IsDead || Me.IsMounted)
            {
                return(false);
            }

            if (Me.InCombat || Target != null && TargetConverted && ConvertedTarget().TaggerType != 0)
            {
                return(await BrainBehavior.CombatLogic.ExecuteCoroutine());
            }

            if (Me.InCombat)
            {
                return(false);
            }

            if (RoutineManager.Current.RestBehavior != null)
            {
                await RoutineManager.Current.RestBehavior.ExecuteCoroutine();
            }

            if (RoutineManager.Current.PreCombatBuffBehavior != null)
            {
                await RoutineManager.Current.PreCombatBuffBehavior.ExecuteCoroutine();
            }

            if (RoutineManager.Current.HealBehavior != null)
            {
                await RoutineManager.Current.HealBehavior.ExecuteCoroutine();
            }

            if (PartyManager.IsInParty && MainSettingsModel.Instance.UseSmartPull)
            {
                if (Me.CurrentTarget != null)
                {
                    if (Target != null && TargetConverted && ConvertedTarget().Tapped&& ConvertedTarget().TaggerType == 2)
                    {
                        if (RoutineManager.Current.PullBuffBehavior != null && TargetingManager.IsValidEnemy(Core.Player.CurrentTarget))
                        {
                            await RoutineManager.Current.PullBuffBehavior.ExecuteCoroutine();
                        }

                        if (RoutineManager.Current.PullBehavior != null && MainSettingsModel.Instance.UsePull && TargetingManager.IsValidEnemy(Core.Player.CurrentTarget) && Core.Player.CurrentTarget.Location.Distance3D(Core.Player.Location) <= RoutineManager.Current.PullRange + Core.Player.CurrentTarget.CombatReach)
                        {
                            return(await RoutineManager.Current.PullBehavior.ExecuteCoroutine());
                        }
                    }
                }

                var tankCheck = PartyManager.VisibleMembers;
                if (tankCheck.Any(x => PartyDescriptors.IsTank(x.Class)))
                {
                    return(false);
                }
            }

            if (RoutineManager.Current.PullBuffBehavior != null && TargetingManager.IsValidEnemy(Core.Player.CurrentTarget))
            {
                await RoutineManager.Current.PullBuffBehavior.ExecuteCoroutine();
            }

            if (Me.CurrentTarget == null)
            {
                return(false);
            }

            if (RoutineManager.Current.PullBehavior != null && MainSettingsModel.Instance.UsePull && TargetingManager.IsValidEnemy(Core.Player.CurrentTarget) && Core.Player.CurrentTarget.Location.Distance3D(Core.Player.Location) <= RoutineManager.Current.PullRange + Core.Player.CurrentTarget.CombatReach)
            {
                return(await RoutineManager.Current.PullBehavior.ExecuteCoroutine());
            }

            return(false);
        }
예제 #30
0
 protected override List <string> Supplier()
 {
     return(TargetingManager.TargetingPriorities(sensor));
 }
예제 #31
0
 // TODO: this function will be separated from Block to be used independently in Battle
 public BehaviorData GetTargetedBot(BotController myself)
 {
     return(new BehaviorData(TargetingManager.NthTarget(int.Parse(info.TypeAttrs["n"]), CurrentValue, myself)));
 }
예제 #32
0
 // Use this for initialization
 void Start()
 {
     player           = GameObject.Find("Player");
     targetingManager = GameObject.Find("TargetingSystem").GetComponent <TargetingManager>();
 }