Пример #1
0
 private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (Settings.useEOnGapcloser && sender.IsEnemy)
     {
         Vector3 castTo = e.EndPos;
         SpellManager.E.Cast(castTo);
     }
 }
Пример #2
0
 private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (!sender.IsMe) return;
     _dashStartTime = e.StartTick;
     _dashEndTime = e.EndTick;
     _endPos = e.EndPos;
     _startPos = e.StartPos;
 }
Пример #3
0
 private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (!sender.IsMe)
     {
         return;
     }
     Variables.isDash = true;
     Variables.posDash = e.EndPos;
 }
Пример #4
0
 internal static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     Spell.Skillshot W = SpellManager.W;
     if (Settings.antiDash && W.IsReady() && sender.IsValid && sender.IsEnemy && !sender.IsDead && !sender.IsInvulnerable && !sender.IsZombie && sender.IsInRange(Player.Instance, W.Range))
     {
         if (Player.Instance.Distance(e.EndPos) < Player.Instance.Distance(e.StartPos))
             W.Cast(sender);
         else if (Settings.antiDashOffensive)
             W.Cast(sender);
     }
 }
Пример #5
0
        private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            if (!Config.SpellMenu["dashE"].Cast<CheckBox>().CurrentValue || Player.IsDead || Player.IsRecalling() || !sender.IsEnemy || !E.IsReady())
                return;

            if (Config.SpellMenu["saveRMana"].Cast<CheckBox>().CurrentValue && Player.Mana - Utility.EMana() <= Utility.RMana())
                return;

            if (sender.IsValidTarget(E.Range))
                E.Cast(sender);
        }
Пример #6
0
 public static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (!sender.IsMe)
         return;
     LastAATick = Game.Time * 1000 - Game.Ping / 2 - (int)Player.Instance.AttackCastDelay * 1000 + e.Duration;
     DashTarget = Orbwalker.LastTarget;
     DashTick = Game.Time * 1000 - Game.Ping / 2;
     Dashing = true;
     DashDur = e.Duration;
     Orbwalker.DisableAttacking = true;
 }
Пример #7
0
 private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (!sender.IsMe)
         return;
     if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
         return;
     if (!Checker.HasItem() || Item.CanUseItem(3748))
         return;
     if (e.Duration - 100 - Game.Ping / 2 > 0)
     {
         Core.DelayAction(() => Checker.CastItem(),
                         (int)(e.Duration - 100 - Game.Ping / 2));
     }
     else
     {
         Checker.CastItem();
     }
 }
Пример #8
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Width != null)
         {
             hashCode = hashCode * 59 + Width.GetHashCode();
         }
         if (Dash != null)
         {
             hashCode = hashCode * 59 + Dash.GetHashCode();
         }
         if (DashSrc != null)
         {
             hashCode = hashCode * 59 + DashSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
        public void notifyDash(Unit u,
                               Target t,
                               float dashSpeed,
                               bool keepFacingLastDirection,
                               float leapHeight,
                               float followTargetMaxDistance,
                               float backDistance,
                               float travelTime)
        {
            var dash = new Dash(u,
                                t,
                                dashSpeed,
                                keepFacingLastDirection,
                                leapHeight,
                                followTargetMaxDistance,
                                backDistance,
                                travelTime);

            _game.PacketHandlerManager.broadcastPacketVision(u, dash, Channel.CHL_S2C);
        }
    //------------------------------------------------------------------------------------------
    // Allows players to dash and phase right through snowballs
    //------------------------------------------------------------------------------------------
    private void Projectiles()
    {
        Dash     scpDash     = gameObject.GetComponent <Dash>();
        Snowball scpSnowball = m_goSnowball.GetComponent <Snowball>();

        //Dash scpDash = gameObject.GetComponent<Dash>();

        // If you are dashing through a snowball that is stationary and have a ball.
        if (!scpSnowball.m_bTooFast && m_bHasBall && !scpDash.m_bDashing)
        {
            // Array of snowballs in the scene.
            Snowball[] arrSnowballs = FindObjectsOfType <Snowball>();

            for (int i = 0; i < arrSnowballs.Length; i++)
            {
                // Disable collider on snowball.
                Physics.IgnoreCollision(arrSnowballs[i].gameObject.GetComponent <Collider>(), gameObject.GetComponent <Collider>(), false);
            }
        }
    }
Пример #11
0
        private static void OnDash(Obj_AI_Base sender, Dash.DashEventArgs args)
        {
            if (Orbwalker.DisableMovement)
                Orbwalker.DisableMovement = false;

            if (sender.IsMe && ModeController.OrbCombo && leapTarget != null)
            {
                if (leapTarget != null && leapTarget.IsValidTarget() && Return.UseECombo && Spells.E.IsReady() && (!Return.HaveFullFerocity || !Return.OneShotActive || !Player.Instance.HasBuff("rengarqbase") || Player.Instance.HasBuff("rengarqemp")))
                {
                    var pred = Spells.E.GetPrediction(leapTarget);

                    if (pred.HitChance > HitChance.Immobile)
                        Spells.E.Cast(pred.CastPosition);
                    else
                        Spells.E.Cast((leapTarget as Obj_AI_Base).ServerPosition);
                }

                if (Return.UseWCombo)
                    Spells.W.Cast();
            }
        }
Пример #12
0
        public static void CastQCone(Obj_AI_Base target)
        {
            if (!ObjectManager.Player.IsDashing())
            {
                return;
            }
            var data = Dash.GetDashInfo(ObjectManager.Player);

            if (data == null)
            {
                return;
            }
            //if (ObjectManager.Player.ServerPosition.To2D().Distance(data.EndPos) >= Game.Ping + 150)
            //    return;
            var pred = Prediction.GetPrediction(target, (data.EndTick - Utils.TickCount) /*(475 + LastETick - Environment.TickCount) / 1000f*/);

            if (pred.UnitPosition.To2D().Distance(data.EndPos) <= 270 || target.Distance(data.EndPos) <= 270)
            {
                ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Q, ObjectManager.Player.Position);
            }
        }
Пример #13
0
        public void NotifyDash(IAttackableUnit u,
                               ITarget t,
                               float dashSpeed,
                               bool keepFacingLastDirection,
                               float leapHeight,
                               float followTargetMaxDistance,
                               float backDistance,
                               float travelTime)
        {
            var dash = new Dash(_navGrid,
                                u,
                                t,
                                dashSpeed,
                                keepFacingLastDirection,
                                leapHeight,
                                followTargetMaxDistance,
                                backDistance,
                                travelTime);

            _packetHandlerManager.BroadcastPacketVision(u, dash, Channel.CHL_S2C);
        }
    private void Start()
    {
        anim       = GetComponentInChildren <Animator>();
        rb         = GetComponent <Rigidbody>();
        dashScript = GetComponent <Dash>();

        playerDirection = Direction.Down;
        SetPlayerDirection(Direction.Down, Vector2.zero);

        DirToAttackPoint = new Dictionary <Direction, Transform>()
        {
            { Direction.Up, AttackPoints.upAttackPoint },
            { Direction.UpLeft, AttackPoints.upLeftAttackPoint },
            { Direction.Left, AttackPoints.leftAttackPoint },
            { Direction.DownLeft, AttackPoints.downLeftAttackPoint },
            { Direction.Down, AttackPoints.downAttackPoint },
            { Direction.DownRight, AttackPoints.downRightAttackPoint },
            { Direction.Right, AttackPoints.rightAttackPoint },
            { Direction.UpRight, AttackPoints.upLeftAttackPoint }
        };
    }
Пример #15
0
        public void Setup()
        {
            _tempFolder         = new TemporaryFolder();
            _filePath           = _tempFolder.GetTemporaryFile();
            _lexEntryRepository = new LexEntryRepository(_filePath);

            Form window = new Form();

            window.Size = new Size(800, 600);

            _lexEntryRepository.CreateItem();

            Dash dash = new Dash(_lexEntryRepository, null);            //, new UserSettingsForTask());

            dash.ThingsToMakeButtonsFor = GetButtonItems();
            dash.Dock = DockStyle.Fill;
            window.Controls.Add(dash);
            window.BackColor = dash.BackColor;
            dash.Activate();
            Application.Run(window);
        }
Пример #16
0
    void ThrowMissel()
    {
        if (!throwMissile)
        {
            return;
        }
        if (thing.dead)
        {
            return;
        }

        direction = Vector3.up;// (PlayerControl1.Instance.transform.position - transform.position).normalized;
        GameObject bombTemp = Instantiate(boss.missel, (Vector2)transform.position + direction * 200, Quaternion.identity);

        bombTemp.GetComponent <Rigidbody2D>().velocity = direction * throwSpeed;
        Ti_Missel bombTi = bombTemp.GetComponent <Ti_Missel>();

        bombTi.target = player;
        bombTi.transform.localRotation = Quaternion.Euler(0, 0, -Dash.AngleBetween(Vector2.up, direction));
        bombTi.isTrigger = true;
    }
Пример #17
0
    void Start()
    {
        rb2d             = gameObject.GetComponent <Rigidbody2D>();
        rb2d.isKinematic = false;

        anim = gameObject.GetComponent <Animator>();

        if (GameObject.FindGameObjectWithTag("cpMaster") != null)
        {
            checkpointMaster = GameObject.FindGameObjectWithTag("cpMaster").GetComponent <CheckpointMaster>();
        }

        if (GameObject.FindGameObjectWithTag("DeathBed") != null)
        {
            deadlyObjects = GameObject.FindGameObjectWithTag("DeathBed").GetComponent <KillPlayer>();
        }

        if (GameObject.FindGameObjectWithTag("CameraShaker") != null)
        {
            cameraShaker = GameObject.FindGameObjectWithTag("CameraShaker").GetComponent <Shake>();
        }

        if (GameObject.FindGameObjectWithTag("TimeMaster") != null)
        {
            timeMaster = GameObject.FindGameObjectWithTag("TimeMaster").GetComponent <TimeMaster>();
        }

        if (GameObject.FindGameObjectWithTag("LevelReset") != null)
        {
            resetLevel = GameObject.FindGameObjectWithTag("LevelReset").GetComponent <ResetLevel>();
        }

        if (GameObject.FindGameObjectWithTag("GameOverScreen") != null)
        {
            gameOverScreen = GameObject.FindGameObjectWithTag("GameOverScreen");
            gameOverScreen.SetActive(false);
        }

        dash = gameObject.GetComponent <Dash>();
    }
Пример #18
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Color != null)
                {
                    hashCode = hashCode * 59 + Color.GetHashCode();
                }

                if (Width != null)
                {
                    hashCode = hashCode * 59 + Width.GetHashCode();
                }

                if (Shape != null)
                {
                    hashCode = hashCode * 59 + Shape.GetHashCode();
                }

                if (Smoothing != null)
                {
                    hashCode = hashCode * 59 + Smoothing.GetHashCode();
                }

                if (Dash != null)
                {
                    hashCode = hashCode * 59 + Dash.GetHashCode();
                }

                if (Simplify != null)
                {
                    hashCode = hashCode * 59 + Simplify.GetHashCode();
                }

                return(hashCode);
            }
        }
Пример #19
0
    public void Start()
    {
        MyAnimator     = GetComponent <Animator>();
        rb             = GetComponent <Rigidbody2D>();
        isFacingRight  = true;
        canMove        = true;
        health         = 3;
        shake          = GameObject.FindGameObjectWithTag("ScreenShake").GetComponent <Shake>();
        respawnTime    = 0;
        respawnMaxTime = 2;

        // Dash initialisation
        dashAction = new Dash
        {
            DashDuration = dashDuration,
            DashForce    = dashForce
        };

        // Move initialisation
        moveAction = new MovePlayer();
        moveAction.Initialize(MyAnimator);
    }
Пример #20
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Line other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                     ) &&
                 (
                     Width == other.Width ||
                     Width != null &&
                     Width.Equals(other.Width)
                 ) &&
                 (
                     Dash == other.Dash ||
                     Dash != null &&
                     Dash.Equals(other.Dash)
                 ) &&
                 (
                     Shape == other.Shape ||
                     Shape != null &&
                     Shape.Equals(other.Shape)
                 ) &&
                 (
                     Smoothing == other.Smoothing ||
                     Smoothing != null &&
                     Smoothing.Equals(other.Smoothing)
                 ));
        }
Пример #21
0
    void Control()
    {
        if (Input.GetKey(keys.GetKey("Up")) && onAttack.GetAttackState() != AttackState.Attacking)
        {
            moveVector.y = 1;
        }
        else if (Input.GetKey(keys.GetKey("Down")) && onAttack.GetAttackState() != AttackState.Attacking)
        {
            moveVector.y = -1;
        }
        else
        {
            moveVector.y = 0;
        }

        if (Input.GetKey(keys.GetKey("Left")) && onAttack.GetAttackState() != AttackState.Attacking)
        {
            moveVector.x = -1;
        }
        else if (Input.GetKey(keys.GetKey("Right")) && onAttack.GetAttackState() != AttackState.Attacking)
        {
            moveVector.x = 1;
        }
        else
        {
            moveVector.x = 0;
        }

        if (Input.GetKey(keys.GetKey("Dash")) && dashCon == Dash.Nope)
        {
            dashCon = Dash.Dashing;
        }

        if (Input.GetKey(keys.GetKey("Attack1")) && onAttack.GetAttackState() == AttackState.Nope)
        {
            onAttack.SetAttackState(AttackState.Attacking);
        }
    }
Пример #22
0
    public void SetActions()
    {
        //Dash
        Dash da = new Dash();

        da.SetActionButtonData(this);
        actions.Add(da);
        dash = da;

        //Defend
        Defend df = new Defend();

        df.SetActionButtonData(this);
        actions.Add(df);
        defend = df;

        //Prime
        Prime pr = new Prime();

        pr.SetActionButtonData(this);
        actions.Add(pr);
        prime = pr;
    }
Пример #23
0
 public Looter(string characterType, int level) : base(characterType, level)
 {
     CurrentHealth         = level * level * 10;
     MaxHealth             = level * level * 10;
     Damage                = 1.5;
     MaxDamage             = Damage;
     Defense               = 100;
     MaxDefense            = Defense;
     Energy                = 0;
     EnergyFillRate        = 6;
     CurrentQueueSize      = 0;
     MaxQueueSize          = 4;
     CriticalPercentage    = 15;
     MaxCriticalPercentage = CriticalPercentage;
     MissPercentage        = 15;
     MaxMissPercentage     = MissPercentage;
     ExperienceMultiplier  = 1.0;
     GoldMultiplier        = 2.0;
     attackOne             = new Attack();
     attackTwo             = new Steal();
     attackThree           = new QuickAttack();
     attackFour            = new Dash();
 }
Пример #24
0
 // Use this for initialization
 void Start()
 {
     speedModifiers = new List <SpeedModifier>();
     rb             = GetComponent <Rigidbody>();
     playerStat     = GetComponent <PlayerStatus>();
     playerStat.StartPlayerStatus();
     blood = GetComponent <Bloodlust>();
     blood.StartBloodlust();
     dash = GetComponent <Dash>();
     dash.StartDash();
     swordAttack         = Instantiate(cleaveAttacks[0], bodyAnimator.transform.position, bodyAnimator.transform.rotation, bodyAnimator.transform);
     currentCleaveAttack = Instantiate(cleaveAttacks[MutationManager.Instance.TentacleMutation.CurrentLevel], bodyAnimator.transform.position, bodyAnimator.transform.rotation, bodyAnimator.transform);
     currentCleaveAttack.SetActive(false);
     bodyAnimator.SetInteger("CleaveLevel", MutationManager.Instance.TentacleMutation.CurrentLevel);
     stunned       = false;
     isStunnable   = true;
     swordReady    = true;
     hopping       = false;
     rot           = 0;
     attackTimer   = 1000;
     cleaveTimer   = 1000;
     currencySound = GetComponent <AudioSource>();
 }
Пример #25
0
    void AttackTarget()
    {
        switch (_type)
        {
        case EnemyType.Monkey:
            Dash d = _samurai.actions["Dash"] as Dash;
            if (d.ActionReady())
            {
                d.DoAction();
                _samurai.StealthOff();
            }
            break;

        case EnemyType.Tiger:
            Attack a = _samurai.actions["Attack"] as Attack;
            if (a.ActionReady())
            {
                a.DoAction();
                _samurai.StealthOff();
            }
            break;
        }
    }
Пример #26
0
        public static void Execute()
        {
            // Get closest jungle creep
            var target = Targeting.Monsters();

            // Check if target/self are valid for spells
            if (!States.SpellReady(target))
            {
                return;
            }

            // Check if no enemy before casting E
            if (Self.EnemiesWithinRange(ScanRange) == 0)
            {
                // Check if should E to mouse or target
                if (target.WithinRange(Dash.PostPosition(MousePosition), EffectiveAttackRange))
                {
                    Player.CastSpell(SpellSlot.E, MousePosition);
                }
                else if (target.WithinRange(Dash.PostPosition(target.ServerPosition), EffectiveAttackRange))
                {
                    Player.CastSpell(SpellSlot.E, target.ServerPosition);
                }
            }

            // Cast Q
            Q.TryToCast(target, JungleClearMenu);

            // Cast W
            if (JungleClearMenu.GetCheckBoxValue("wUse") && target.WithinRange(EffectiveAttackRange))
            {
                if (!W.TryToCast(target, ComboMenu))
                {
                    CastW(target.ServerPosition);
                }
            }
        }
Пример #27
0
    public void BeginSuperDashState(int dirMark)
    {
        Vector2 dashDir = Vector2.zero;

        switch (dirMark)
        {
        case 1: dashDir = new Vector2(-1, 1); break;

        case 2: dashDir = new Vector2(-1, 0); break;

        case 3: dashDir = new Vector2(-1, -1); break;

        case 4: dashDir = new Vector2(1, 1); break;

        case 5: dashDir = new Vector2(1, 0); break;

        case 6: dashDir = new Vector2(1, -1); break;
        }
        pauseState = false;
        dashState  = true;
        _velocity  = dashDir * superDash.dashSpeed;
        if (dashDir.magnitude != 1)
        {
            _velocity *= Mathf.Sin(Mathf.PI / 4);
        }
        currentDash = superDash;

        if (rightArrow.gameObject.activeSelf)
        {
            rightArrow.gameObject.SetActive(false);
        }

        if (leftArrow.gameObject.activeSelf)
        {
            leftArrow.gameObject.SetActive(false);
        }
    }
Пример #28
0
        public static void notifyDash(Unit u, float _x, float _y, float dashSpeed)
        {
            // TODO: Fix dash: it stays in the current location and doesn't hit a wall if the target location can't be reached
            float _z = u.getZ();

            /*if (!map.isWalkable(_x, _y)) {
             * _x = u.getPosition().X;
             * _y = u.getPosition().Y;
             * }
             * else {
             * // Relative coordinates to dash towards
             * float newX = _x;
             * float newY = _y;
             * _z -= map.getHeightAtLocation(_x, _y);
             * _x = u.getPosition().X - _x;
             * _y = u.getPosition().Y - _y;
             *
             * u.setPosition(newX, newY);
             * }*/

            var dash = new Dash(u, _x, _y, dashSpeed);

            PacketHandlerManager.getInstace().broadcastPacketVision(u, dash, Channel.CHL_S2C);
        }
Пример #29
0
    private void Start()
    {
        animator = GetComponent <Animator>();

        if (!(jump = FindObjectOfType <Jump>()))
        {
            jump = gameObject.AddComponent <Jump>();
        }

        if (!(shoot = FindObjectOfType <Shoot>()))
        {
            shoot = gameObject.AddComponent <Shoot>();
        }

        if (!(invincible = FindObjectOfType <Invincible>()))
        {
            invincible = gameObject.AddComponent <Invincible>();
        }

        if (!(dash = FindObjectOfType <Dash>()))
        {
            dash = gameObject.AddComponent <Dash>();
        }
    }
Пример #30
0
 private static void Unit_OnDash(Obj_AI_Base sender, Dash.DashItem args)
 {
     
 }
Пример #31
0
 // TODO Teste on Dash !
 public static void Unit_OnDash(Obj_AI_Base sender, Dash.DashEventArgs args)
 {
     if (sender.IsEnemy &&
         sender is AIHeroClient &&
         Spells.E.IsReady() &&
         args.EndPos.Distance(Utils._Player.Position) < Spells.E.Range &&
         Utils.isChecked(MenuX.Misc, "EDash"))
     {
         var target = Spells.E.GetPrediction(sender);
         var pos = target.CastPosition;
         if (pos.IsValid())
         Spells.E.Cast(pos.Extend(sender.Position, 375).To3D());
     }
 }
Пример #32
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Line other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Width == other.Width ||
                     Width != null &&
                     Width.Equals(other.Width)
                     ) &&
                 (
                     Dash == other.Dash ||
                     Dash != null &&
                     Dash.Equals(other.Dash)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     Equals(ColorArray, other.ColorArray) ||
                     ColorArray != null && other.ColorArray != null &&
                     ColorArray.SequenceEqual(other.ColorArray)
                 ) &&
                 (
                     CAuto == other.CAuto ||
                     CAuto != null &&
                     CAuto.Equals(other.CAuto)
                 ) &&
                 (
                     CMin == other.CMin ||
                     CMin != null &&
                     CMin.Equals(other.CMin)
                 ) &&
                 (
                     CMax == other.CMax ||
                     CMax != null &&
                     CMax.Equals(other.CMax)
                 ) &&
                 (
                     CMid == other.CMid ||
                     CMid != null &&
                     CMid.Equals(other.CMid)
                 ) &&
                 (
                     ColorScale == other.ColorScale ||
                     ColorScale != null &&
                     ColorScale.Equals(other.ColorScale)
                 ) &&
                 (
                     AutoColorScale == other.AutoColorScale ||
                     AutoColorScale != null &&
                     AutoColorScale.Equals(other.AutoColorScale)
                 ) &&
                 (
                     ReverseScale == other.ReverseScale ||
                     ReverseScale != null &&
                     ReverseScale.Equals(other.ReverseScale)
                 ) &&
                 (
                     ShowScale == other.ShowScale ||
                     ShowScale != null &&
                     ShowScale.Equals(other.ShowScale)
                 ) &&
                 (
                     ColorBar == other.ColorBar ||
                     ColorBar != null &&
                     ColorBar.Equals(other.ColorBar)
                 ) &&
                 (
                     ColorAxis == other.ColorAxis ||
                     ColorAxis != null &&
                     ColorAxis.Equals(other.ColorAxis)
                 ) &&
                 (
                     ColorSrc == other.ColorSrc ||
                     ColorSrc != null &&
                     ColorSrc.Equals(other.ColorSrc)
                 ));
        }
Пример #33
0
        private static void UnitOnOnDash(Obj_AI_Base sender, Dash.DashEventArgs args)
        {
            if (sender.IsMe)
            {
                if (Config.PrintSpellData)
                {
                    Console.WriteLine(
                        Utils.TickCount + "DASH: Speed: " + args.Speed + " Width:" +
                        args.EndPos.Distance(args.StartPos));
                }

                //Utility.DelayAction.Add(args.Duration, delegate { Evading = false; });
            }
        }
Пример #34
0
        private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var target = TargetSelector.GetTarget(1500, DamageType.Physical);
            if (!target.IsValidTarget())
            {
                return;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (Standarts.Ferocity == 5)
                {
                    switch (Helper.MenuChecker.ComboModeSelected)
                    {
                        case 2:
                            if (E.IsReady() && target.IsValidTarget(E.Range))
                            {
                                E.Cast(target);
                            }
                            break;
                        case 1:
                            if (Q.IsReady() && target.IsValidTarget(Q.Range))
                            {
                                Q.Cast();
                                Orbwalker.ResetAutoAttack();
                            }

                            if (target.IsValidTarget(Q.Range))
                            {

                                Core.DelayAction(() =>
                                {
                                    if (target.IsValidTarget(W.Range))
                                    {
                                        W.Cast();
                                    }
                                    E.Cast(target);
                                    Modes.Combo.CastItems();
                                },
                               50);
 
                            }

                            break;
                    }
                }

                switch (Helper.MenuChecker.ComboModeSelected)
                {
                    case 2:
                        if (E.IsReady() && target.IsValidTarget(E.Range))
                        {
                            E.Cast(target);
                        }
                        break;

                    case 1:
                        if (RengarHasUltimate && Q.IsReady())
                        {
                            Q.Cast();
                            Orbwalker.ResetAutoAttack();
                        }
                        break;
                }

                if (e.Duration - 100 - Game.Ping / 2 > 0)
                {
                    Core.DelayAction(() => Modes.Combo.CastItems(), e.Duration - 100 - Game.Ping / 2);
                }
            }
        }
Пример #35
0
    // We use FixedUpdate to do all the animation work
    void Update()
    {
        dashed     = false;
        dashTimer -= Time.deltaTime;
        if (Input.GetKeyDown("escape"))
        {
            Application.Quit();
        }

        // Get the extent to which the player is currently pressing left or right
        float   h         = Input.GetAxis("Horizontal");
        float   v         = Input.GetAxis("Vertical");
        Vector2 direction = new Vector2(h, v);

        // update queued dash timer
        if (nextDash != null && nextDash.CheckCounter())
        {
            nextDash.UpdateDir(direction);
        }

        if (currentDash == null && (numDashes > 0 || state == playerStates.hooked) && dashTimer <= 0 && nextDash != null)
        {
            // we move the dash from queue to current
            DoDash(nextDash);
            nextDash = null;
        }
        else if (Input.GetKeyDown("space") && (numDashes > 0 || state == playerStates.hooked))
        {
            // can dash create current dash
            if (currentDash == null && dashTimer <= 0)
            {
                DoDash(new Dash(direction));
            }
            else
            {
                // add a dash to the queue
                if (nextDash == null)
                {
                    nextDash = new Dash(direction);
                }
            }
        }
        else if (currentDash != null && currentDash.CheckCounter())
        {
            // we can still adjust the dash
            currentDash.UpdateDir(direction);
            float vnorm = rb.velocity.magnitude;
            rb.velocity = new Vector2(vnorm * currentDash.direction.normalized.x, vnorm * currentDash.direction.normalized.y);
        }

        // Pass in the current velocity of the RigidBody2D
        // The speed parameter of the Animator now knows
        // how fast the player is moving and responds accordingly
        //Debug.Log(rb.velocity.x);
        anim.SetFloat("Velocity", rb.velocity.x);

        // Check which way the player is facing
        // and call reverseImage if neccessary

        /*if (h < 0 && !facingLeft)
         *  reverseImage();
         * else if (h > 0 && facingLeft)
         *  reverseImage();*/
        if (ready)
        {
            // Fire1 should be setup in the input manager else use the following line
            // Edit->Project Settings->Input
            //if (Input.GetKeyDown(KeyCode.E))
            if (Input.GetButtonDown("Fire1"))
            {
                ready = false;
                Shoot();
            }
        }
        if (!dashed)
        {
            if (state == playerStates.hooked)
            {
                // get pulled
                var vec = hookLine.transform.position - transform.position;
                // remove z component
                vec.z       = 0;
                vec         = vec.normalized * hookedVelocity;
                rb.velocity = new Vector2(vec.x, vec.y);
            }
            else if (meteor != null)
            {
                // meteor != null implies standing
                transform.position = new Vector3(meteor.transform.position.x, meteor.transform.position.y, transform.position.z);
            }
        }
    }
Пример #36
0
 private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (sender.IsValidTarget() && sender.IsEnemy)
     {
         if (Util.MyHero.Distance(e.StartPos, true) < Util.MyHero.Distance(e.EndPos, true))
         {
             if (MenuManager.Menu.GetCheckBoxValue("W.Spells"))
             {
                 SpellManager.CastW(sender);
             }
         }
         else
         {
             if (MenuManager.Menu.GetCheckBoxValue("E.Antigapcloser"))
             {
                 //SpellManager.CastE(sender);
             }
             if (Util.MyHero.Distance(e.EndPos, true) < (sender.GetAutoAttackRange(Util.MyHero) * 1.5f).Pow())
             {
                 ShouldWaitTime = Core.GameTickCount;
             }
         }
     }
 }
Пример #37
0
    // Use this for initialization
    void Awake()
    {
        MAX_VELOCITY_Z = 4;
        MAX_VELOCITY_X = 3;
        rigidBody = GetComponent<Rigidbody>();

        takingInput = false;
        sprite = GetComponent<SpriteRenderer>();

        scoreTimer = GameObject.Find("Score").GetComponent<Score>();
        dasher = gameObject.GetComponent<Dash>();
        dasher.init(rigidBody);

        tSpawner = GetComponent<TrailSpawner> ();
        tSpawner.init(.15f, "Prefabs/Trail");

        ballPop = gameObject.GetComponent<AudioSource>();
    }
Пример #38
0
        private static void OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var target = TargetSelector.GetTarget(1500, DamageType.Physical);
            if (!target.IsValidTarget())
            {
                return;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (Rengar.Mana == 5)
                {
                    switch (AllMenu["combo.mode"].Cast<Slider>().CurrentValue)
                    {
                        case 2:
                            if (E.IsReady() && target.IsValidTarget(E.Range))
                            {
                                E.Cast(target);
                            }
                            break;
                        case 1:
                            if (Q.IsReady() && target.IsValidTarget(Q.Range))
                            {
                                Q.Cast();
                            }   

                            if (target.IsValidTarget(Q.Range))
                            {
                                Core.DelayAction(null, 50);
                                {
                                    if (target.IsValidTarget(W.Range))
                                    {
                                        W.Cast();
                                    }

                                    E.Cast(target);
                                    Items();
                                    BotrkAndBilgewater(target);
                                };
                            }

                            break;
                    }
                }
            }

            switch (AllMenu["combo.mode"].Cast<Slider>().CurrentValue)
            {
                case 2:
                    if (E.IsReady() && target.IsValidTarget(E.Range))
                    {
                        E.Cast(target);
                    }
                    break;

                case 1:
                    if (RengarUltiActive)
                    {
                        Q.Cast();
                    }
                    break;
                case 0:
                {
                    if (W.IsReady() && target.IsValidTarget(W.Range))
                    {
                        W.Cast();
                    }
                    break;
                }
            }

            if (e.Duration - 100 - Game.Ping / 2 > 0)
            {
                Core.DelayAction(null, (int)(e.Duration - 100 - Game.Ping / 2));
                { Items(); BotrkAndBilgewater(target); };


            }
        }
Пример #39
0
        /*
        OnDash
        */

        private static void OnDash(Obj_AI_Base sender, Dash.DashEventArgs args)
        {
            var target = TargetSelector.GetTarget(R.Range, DamageType.Physical); // 1500?
            if (target == null || !target.IsValidTarget()) return;
            if (sender.IsMe && onCombo)
            {
                var cType = Misc.getSliderValue(ComboMenu, "cPrio");
                if (Ferocity == 5)
                {
                    if (cType == 1 && _Player.IsDashing())
                        Casts.useQ(target);
                    if (cType == 0 && _Player.IsDashing())
                        Casts.useE(target);
                }
                if (Ferocity < 5)
                {
                    if (E.IsReady() && _Player.IsDashing())
                    {
                        Casts.useE(target);
                        Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                    }
                    if (Q.IsReady() && _Player.IsDashing())
                    {
                        Casts.useQ(target);
                        Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                    }
                    if (W.IsReady() && _Player.IsDashing())
                    {
                        Casts.useW(target);
                        Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                        Items.useHydra(target);
                    }
                }
            }
        }
Пример #40
0
 public DashState(PlayerMovement playerMovement, Dash dash) : base(playerMovement)
 {
     this.dash = dash;
 }
Пример #41
0
        public override void Update()
        {
            // Stamina regen
            staminaRegenTimer++;

            // Counts down before doing the lost stamina graphic
            if (lostStaminaTimer > 0)
            {
                lostStaminaTimer--;
            }

            // Regens faster if you haven't been spamming
            if (staminaRegenTimer >= 80 && stamina < maxStamina)
            {
                stamina++;
                staminaRegenTimer = 80 - (maxStamina - stamina);
            }

            // Decrease lost stamina when appropriate
            if (lostStaminaTimer <= 0)
            {
                lostStamina--;
            }

            // Make sure it's never less.
            if (lostStamina < stamina)
            {
                lostStamina = stamina;
            }

            // Timer for mula
            PlayerStats.timeInLevel++;

            OldPosition = new Vector2(position.X, position.Y);

            #region Animation
            if (animating == true)
            {
                if (Game1.TIMER % (60 / framesPerSecond) == 0)
                {
                    frameIndex++;
                }
                if (frameIndex >= animationList[animationListIndex].Count && looping == true)
                {
                    frameIndex = 0;
                }
                else if (frameIndex >= animationList[animationListIndex].Count && looping == false)
                {
                    A_StopAnimating();
                }
            }
            #endregion

            #region General Movement
            if (Game1.KBState.IsKeyDown(Keys.A))
            {
                acceleration.X = -speed;

                A_GoToAnimationIndex(0);
                A_BeginAnimation();
                hFlip = true;
            }
            else if (Game1.KBState.IsKeyDown(Keys.D))
            {
                acceleration.X = speed;
                A_GoToAnimationIndex(0);
                A_BeginAnimation();
                hFlip = false;
            }

            else if (Math.Abs(velocity.X) < .2f && (Math.Floor(velocity.X) == 0 || Math.Ceiling(velocity.X) == 0))
            {
                velocity.X     = 0;
                acceleration.X = 0;
                A_GoToAnimationIndex(0);
                A_GoToFrameIndex(0);
                A_StopAnimating();
            }
            if (Game1.KBState.IsKeyUp(Keys.D) && Game1.oldKBstate.IsKeyDown(Keys.D))
            {
                if (velocity.X > 0)
                {
                    acceleration.X = -.2f;
                }
                else
                {
                    acceleration.X = .2f;
                }
                if (Math.Abs(velocity.X) < .2f && (Math.Floor(velocity.X) == 0 || Math.Ceiling(velocity.X) == 0))
                {
                    velocity.X     = 0;
                    acceleration.X = 0;
                    A_StopAnimating();
                }
            }
            if (Game1.KBState.IsKeyUp(Keys.A) && Game1.oldKBstate.IsKeyDown(Keys.A))
            {
                if (velocity.X > 0)
                {
                    acceleration.X = -.2f;
                }
                else
                {
                    acceleration.X = .2f;
                }
                if (Math.Abs(velocity.X) < .2f && (Math.Floor(velocity.X) == 0 || Math.Ceiling(velocity.X) == 0))
                {
                    velocity.X     = 0;
                    acceleration.X = 0;
                    A_StopAnimating();
                }
            }

            if (Game1.KBState.IsKeyDown(Keys.W) && !Game1.oldKBstate.IsKeyDown(Keys.W) && jumpCounter < maximumJumps)
            {
                velocity.Y   = -jumpHeight;
                applyGravity = true;
                jumpCounter++;
            }
            if (Game1.KBState.IsKeyDown(Keys.W) && Game1.oldKBstate.IsKeyDown(Keys.W) && SkillWings && velocity.Y > 2.5f)
            {
                velocity.Y = 2.5f;
            }
            #endregion

            #region Dashing

            if (dashing)
            {
                if (dashTimer >= dashTimeLength)
                {
                    velocity.X   = 0;
                    dashing      = false;
                    applyGravity = true;
                    dashTimer    = 0;
                }
                else
                {
                    dashTimer++;
                    acceleration.Y = 0;
                    applyGravity   = false;
                }
            }
            else if (Game1.KBState.IsKeyDown(Keys.LeftShift) && !Game1.oldKBstate.IsKeyDown(Keys.LeftShift) && Game1.KBState.IsKeyDown(Keys.A) && stamina >= 6)
            {
                if (SkillDash)
                {
                    Dash myDash = new Dash(this, Direction.Left);
                    stamina          -= 6;
                    staminaRegenTimer = 0;
                    lostStaminaTimer  = 30;
                }
            }
            else if (Game1.KBState.IsKeyDown(Keys.LeftShift) && !Game1.oldKBstate.IsKeyDown(Keys.LeftShift) && Game1.KBState.IsKeyDown(Keys.D) && stamina >= 6)
            {
                if (SkillDash)
                {
                    Dash myDash = new Dash(this, Direction.Right);
                    stamina          -= 6;
                    staminaRegenTimer = 0;
                    lostStaminaTimer  = 30;
                }
            }
            #endregion

            #region Skills


            // Main skill
            if (Game1.KBState.IsKeyDown(Keys.Space) && Game1.oldKBstate.IsKeyUp(Keys.Space) && stamina >= 8 && availableSkills.Count > 0)
            {
                UseSkill(activeSkillIndex);
                stamina          -= 8;
                staminaRegenTimer = 0;
                lostStaminaTimer  = 30;
            }
            // Secondary Skill
            //if (Game1.KBState.IsKeyDown(Keys.LeftShift) && Game1.oldKBstate.IsKeyUp(Keys.LeftShift))
            //{
            //    int secondaryIndex;
            //    if (activeSkillIndex + 1 == availableSkills.Count)
            //    {
            //        secondaryIndex = 0;
            //    }
            //    else
            //        secondaryIndex = activeSkillIndex + 1;

            //    UseSkill(secondaryIndex);

            //}
            // Change Skill
            if (Game1.KBState.IsKeyDown(Keys.E) && !Game1.oldKBstate.IsKeyDown(Keys.E))
            {
                if (activeSkillIndex + 1 == availableSkills.Count)
                {
                    activeSkillIndex = 0;
                }
                else
                {
                    activeSkillIndex++;
                }
                if (availableSkills.Count == 0)
                {
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ChaoticReset)
                {
                    skillFrame = 0;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ConfuseRay)
                {
                    skillFrame = 1;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.Exile)
                {
                    skillFrame = 2;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.Ghost)
                {
                    skillFrame = 3;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.LightJump)
                {
                    skillFrame = 4;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.LightWall)
                {
                    skillFrame = 5;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ShadowDagger)
                {
                    skillFrame = 6;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ShadowHold)
                {
                    skillFrame = 7;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ShadowPush)
                {
                    skillFrame = 8;
                }
            }
            else if (Game1.KBState.IsKeyDown(Keys.Q) && !Game1.oldKBstate.IsKeyDown(Keys.Q))
            {
                if (activeSkillIndex - 1 < 0)
                {
                    activeSkillIndex = availableSkills.Count - 1;
                }
                else
                {
                    activeSkillIndex--;
                }
                if (availableSkills.Count == 0)
                {
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ChaoticReset)
                {
                    skillFrame = 0;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ConfuseRay)
                {
                    skillFrame = 1;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.Exile)
                {
                    skillFrame = 2;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.Ghost)
                {
                    skillFrame = 3;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.LightJump)
                {
                    skillFrame = 4;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.LightWall)
                {
                    skillFrame = 5;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ShadowDagger)
                {
                    skillFrame = 6;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ShadowHold)
                {
                    skillFrame = 7;
                }
                else if (availableSkills[activeSkillIndex] == ActionSkills.ShadowPush)
                {
                    skillFrame = 8;
                }
            }

            #endregion

            #region Frappy
            if (Game1.KBState.IsKeyDown(Keys.LeftAlt) && Game1.KBState.IsKeyDown(Keys.D2) && Game1.oldKBstate.IsKeyUp(Keys.D2))
            {
                Game1.OBJECT_HANDLER.ChangeState(new FlappyBird());
                return;
            }
            #endregion

            #region Shooting
            if (Game1.mouseState.LeftButton == ButtonState.Pressed && Game1.prevMouseState.LeftButton == ButtonState.Released && (applyGravity == false || airRanged == true))
            {
                Vector2 toMouse = new Vector2(
                    Game1.OBJECT_HANDLER.objectDictionary["Cursor"].Position.X - this.position.X,
                    Game1.OBJECT_HANDLER.objectDictionary["Cursor"].Position.Y - this.position.Y);
                Vector2 dir = toMouse;

                dir.Normalize();
                float angle = (float)Math.Atan(toMouse.Y / toMouse.X);
                toMouse *= 10;
                //toMouse += velocity;
                Vector2 arrowVel = new Vector2(0, 0);
                if (toMouse.Length() / 200 > 20)
                {
                    arrowVel = new Vector2(dir.X * 20, dir.Y * 20);
                }
                else if (toMouse.Length() / 200 < 10)
                {
                    arrowVel = new Vector2(dir.X * 10, dir.Y * 10);
                }
                else
                {
                    arrowVel = new Vector2(dir.X * toMouse.Length() / 200, dir.Y * toMouse.Length() / 200);
                }



                arrowVel = new Vector2(arrowVel.X + velocity.X, arrowVel.Y);


                if (toMouse.X > 0)
                {
                    Projectile temp = new Arrow(arrowVel, this.position + new Vector2(Width / 2, Height / 2), "Arrow");
                }
                else
                {
                    Projectile temp = new Arrow(arrowVel, this.position + new Vector2(Width / 2, Height / 2), "Arrow");
                }
                EndGhost();
            }

            #endregion

            #region Sword
            if (Game1.mouseState.RightButton == ButtonState.Pressed && Game1.prevMouseState.RightButton == ButtonState.Released && (applyGravity != true || airMelee == true) && swordTimer >= 25)
            {
                new Sword(this);
                EndGhost();
                swordTimer = 0;
            }
            swordTimer++;
            #endregion

            #region Other Events
            if (Game1.KBState.IsKeyDown(Keys.B))
            {
                velocity.X = 0;
                velocity.Y = 0;
            }

            if (flashCounter > 0)
            {
                flashCounter--;
            }

            if (applyGravity == true)
            {
                acceleration.Y = strengthOfGravity;
            }
            else
            {
                acceleration.Y = 0.0f;
            }
            if (objectBelow == false)
            {
                applyGravity = true;
            }
            if (velocity.X == 0)
            {
                A_StopAnimating();
                A_GoToFrameIndex(0);
            }
            if (velocity.X > speedLimit && dashing == false)
            {
                velocity.X = speedLimit;
            }
            else if (velocity.X < -speedLimit && dashing == false)
            {
                velocity.X = -speedLimit;
            }
            if (position.Y > LevelVariables.HEIGHT * 64)
            {
                position = new Vector2(200, (LevelVariables.HEIGHT - LevelVariables.GROUND_HEIGHT - 3) * 64);
            }
            if (ghosting == true)
            {
                ghostTimer++;
                if (ghostTimer >= ghostLimit)
                {
                    ghostTimer = 0;
                    ghosting   = false;
                }
            }
            if (position.X < 0)
            {
                position.X = 0;
            }
            if (Game1.OBJECT_HANDLER.currentState.LevelType == LevelName.Home && position.X > 3950)
            {
                position.X = 3950;
            }
            else if (position.X > LevelVariables.WIDTH * 64 - 50)
            {
                position.X = LevelVariables.WIDTH * 64 - 50;
            }


            #region General Updates

            position += velocity;
            velocity += acceleration;
            UpdateCollisionBox();

            if (destroyThis)
            {
                Destroy();
            }
            #endregion
            Game1.CAMERA_DISPLACEMENT = this.position - startingPositon;
            #endregion
        }
Пример #42
0
        private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var target = TargetSelector.GetTarget(1500, DamageType.Physical);
            if (!target.IsValidTarget())
            {
                return;
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if ((int)Rengar.Mana == 5)
                {
                    switch (AllMenu["combo.mode"].Cast<Slider>().CurrentValue)
                    {
                        case 2:
                            if (E.IsReady() && target.IsValidTarget(E.Range))
                            {
                                E.Cast(target);
                            }
                            break;
                        case 1:
                            if (Q.IsReady() && target.IsValidTarget(Q.Range))
                            {
                                QCastResetAa();
                            }

                            if (target.IsValidTarget(Q.Range))
                            {
                                {
                                    if (target.IsValidTarget(W.Range))
                                    {
                                        W.Cast();
                                    }

                                    E.Cast(target);
                                    FullItem(target);
                                }
                            }

                            break;
                    }
                }
            }
        }
    // Initialization
    void Awake()
    {
        attacksInCharacter = new List<Attack> (0);
        foreach(GameObject attackGO in attacksGO){
            Attack attack = (Instantiate(attackGO) as GameObject).GetComponent<Attack>();
            attacksInCharacter.Add(attack);
        }

        if(blockGO!=null){block = (GameObject.Instantiate (blockGO) as GameObject).GetComponent<Block> ();}
        if(dashGO!=null){dash = (GameObject.Instantiate(dashGO) as GameObject).GetComponent<Dash> ();}
    }
Пример #44
0
    //private bool canDoubleJump = false;

    private void Awake()
    {
        dashAbility = player.GetComponent <Dash>();

        dashAbility.enabled = false;
    }
Пример #45
0
        internal static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            try
            {
                if (!sender.IsMe)
                {
                    return;
                }

                var target = TargetSelector.GetTarget(1500, DamageType.Physical);
                if (!target.IsValidTarget())
                {
                    return;
                }

                if (Ferocity == 5 && MenuChecker.ComboModeSelected == 1)
                {
                    if (Q.IsReady())
                    {
                        Q.Cast();
                    }
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (Ferocity == 5)
                    {
                        switch (MenuChecker.ComboModeSelected)
                        {
                            case 2:
                                if (E.IsReady() && target.IsValidTarget(E.Range))
                                {
                                    CastEPrediction(target);
                                }
                                break;
                            case 1:
                                if (Q.IsReady() && target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast();
                                }

                                if (target.IsValidTarget(Q.Range))
                                {
                                    Core.DelayAction((() =>
                                    {
                                        if (target.IsValidTarget(W.Range))
                                        {
                                            W.Cast();
                                        }

                                        CastEPrediction(target);
                                        CastItems();
                                    }), 50);
                                }
                                break;
                        }
                    }

                    switch (MenuChecker.ComboModeSelected)
                    {
                        case 2:
                            if (E.IsReady() && target.IsValidTarget(E.Range))
                            {
                                CastEPrediction(target);
                            }
                            break;

                        case 1:
                            if (Misc.BetaQVariables.BetaQActive &&
                                TargetSelector.SelectedTarget.IsValidTarget(Misc.BetaQVariables.BetaQRange) &&
                                MenuChecker.ComboModeSelected == 1 && RengarHasUltimate && Q.IsReady())
                            {
                                Q.Cast();
                            }
                            break;
                    }

                    if (e.Duration - 100 - Game.Ping/2 > 0)
                    {
                        Core.DelayAction((() => CastItems()), e.Duration - 100 - Game.Ping/2);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Пример #46
0
        private void OnDash(Obj_AI_Base sender, Dash.DashEventArgs dashEventArgs)
        {
            if (!sender.IsMe || LastEvadeResult == null)
            {
                return;
            }

            LastEvadeResult = null;
            Player.IssueOrder(GameObjectOrder.MoveTo, LastIssueOrderPos.To3DWorld(), false);
        }
Пример #47
0
    void Start()
    {
        Time.timeScale = timescale;
        controller = gameObject.GetComponent<BaseController>();
        animator = GetComponentInChildren<Animator>();

        comboAction = GetComponent<Combo>();
        dashAction = GetComponent<Dash>();
        blockAction = GetComponent<Block>();
        airFloatAction = GetComponent<AirFloat>();
        slamAction = GetComponent<Slam>();
        tornadoAction = GetComponent<Tornado>();

        if (GetComponent<AirAttack>() != null)
        {
            airSpecialAction = GetComponent<AirAttack>();
        }
        else if (GetComponent<AirSpecial>())
        {
            airSpecialAction = GetComponent<AirSpecial>();
        }

        controller.OnLand += HandleLanding;

        PlayerInput.SwipeLeft += SwipeLeft;
        PlayerInput.SwipeRight += SwipeRight;
    }
Пример #48
0
        //--------------------------------------------Dash_OnDash-------------------------------------------------

        static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            //Chat.Print(sender.BaseSkinName + " Dash");

            if (Menu["AutoQDash"].Cast<CheckBox>().CurrentValue && Q.IsReady() && sender.IsEnemy && e.EndPos.Distance(Player) <= Q.Range)
            {
                if (sender.BaseSkinName == "Yasuo")
                {
                    if (Player.Distance(e.EndPos) <= 200) Q.HitChanceCast(sender, 70);
                }
                else if (sender.BaseSkinName == "Pantheon")
                {
                    Core.DelayAction(() => Q.Cast(e.EndPos), e.Duration - 50 - Game.Ping - Q.CastDelay);
                }
                //Chat.Print("Why you didn't Q");
                else Q.HitChanceCast(sender, 70);
            }

            return;
        }
Пример #49
0
 void Start()
 {
     dash       = GameObject.Find("Player").GetComponent <Dash>();
     initialPos = transform.localPosition;
     duration   = 0;
 }
Пример #50
0
 protected virtual void OnDash() => Dash?.Invoke();
Пример #51
0
        static void Unit_OnDash(Obj_AI_Base sender, Dash.DashEventArgs args)
        {
            var useQ = ComboMenu["QCombo"].Cast<CheckBox>().CurrentValue;
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (!sender.IsEnemy) return;

            if (sender.NetworkId == target.NetworkId)
            {

                if (useQ && Q.IsReady() && args.EndPos.Distance(_Player) <= Q.Range)
                {

                    var delay = (int)(args.EndTick - Game.Time - 250 - 0.1f);
                    if (delay > 0)
                    {
                        Core.DelayAction(() => Q.Cast(args.EndPos), delay * 1000);
                    }
                    else
                    {
                        Q.Cast(args.EndPos);
                    }
                }
            }
        }
Пример #52
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Width != null)
         {
             hashCode = hashCode * 59 + Width.GetHashCode();
         }
         if (Dash != null)
         {
             hashCode = hashCode * 59 + Dash.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (ColorArray != null)
         {
             hashCode = hashCode * 59 + ColorArray.GetHashCode();
         }
         if (CAuto != null)
         {
             hashCode = hashCode * 59 + CAuto.GetHashCode();
         }
         if (CMin != null)
         {
             hashCode = hashCode * 59 + CMin.GetHashCode();
         }
         if (CMax != null)
         {
             hashCode = hashCode * 59 + CMax.GetHashCode();
         }
         if (CMid != null)
         {
             hashCode = hashCode * 59 + CMid.GetHashCode();
         }
         if (ColorScale != null)
         {
             hashCode = hashCode * 59 + ColorScale.GetHashCode();
         }
         if (AutoColorScale != null)
         {
             hashCode = hashCode * 59 + AutoColorScale.GetHashCode();
         }
         if (ReverseScale != null)
         {
             hashCode = hashCode * 59 + ReverseScale.GetHashCode();
         }
         if (ShowScale != null)
         {
             hashCode = hashCode * 59 + ShowScale.GetHashCode();
         }
         if (ColorBar != null)
         {
             hashCode = hashCode * 59 + ColorBar.GetHashCode();
         }
         if (ColorAxis != null)
         {
             hashCode = hashCode * 59 + ColorAxis.GetHashCode();
         }
         if (ColorSrc != null)
         {
             hashCode = hashCode * 59 + ColorSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #53
0
 private void tabChartInner_SelectedPageChanged(object sender, DevExpress.XtraBars.Navigation.SelectedPageChangedEventArgs e)
 {
     Dash.Refresh_Call_dashboard(tabPane1.SelectedPage.Name.ToString(), tabChartInner.SelectedPage.Name.ToString());
 }
Пример #54
0
        public override void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
        {
            if (!Q.IsReady() || !(sender.BaseSkinName == "Yasuo" && Player.Distance(e.EndPos) <= 200) || !sender.IsEnemy || Player.Distance(e.EndPos) > Q.Range || !misc.IsActive("autoqondash")) return;

            var rectangle = new Geometry.Polygon.Rectangle(Player.Position, e.EndPos, Q.Width);

            if (!EntityManager.MinionsAndMonsters.EnemyMinions.Any(it => !it.IsDead && it.IsValidTarget() && rectangle.IsInside(it)) || !(EntityManager.Heroes.Enemies.Count(enemy => !enemy.IsDead && enemy.IsValidTarget() && rectangle.IsInside(enemy)) > 0))
            {
                Q.Cast(e.EndPos);
            }
        }
Пример #55
0
 private static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (sender.IsValidTarget() && sender.IsEnemy)
     {
     }
 }
Пример #56
0
 static void OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     if (sender.Type != GameObjectType.AIHeroClient) return;
 }
Пример #57
0
            public static void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
            {
                if (!sender.IsEnemy || !R.IsReady() || sender == null || !sender.IsKillable(R.Range) || !MiscMenu.checkbox("Rgap"))
                {
                    return;
                }

                R.Cast(sender);
            }
Пример #58
0
 public virtual void Dash_OnDash(Obj_AI_Base sender, Dash.DashEventArgs e)
 {
     //if (Player.IsDead || !sender.IsEnemy) return;
 }
Пример #59
0
 private void OnDash(Obj_AI_Base sender, Dash.DashEventArgs args)
 {
     if (sender.IsMe)
     {
         InitTime = 0;
         Target = Vector3.Zero;
     }
 }