Exemple #1
0
        protected override void ClickSecond()
        {
            action.data["pos"] = LastClickPos.ToString();
            mapElementInfo.SetRepeatAction(new ActionWaiting(action, mapElementInfo.data.action, mapElementInfo.Pos()));

            //set move to
            Debug.Log("Click second on " + LastClickPos);
        }
Exemple #2
0
        public static void OnWndProc(WndEventArgs args)
        {
            if (args.Msg != (uint)WindowsMessages.WM_LBUTTONDOWN)
            {
                return;
            }

            var asec = ObjectManager.Get <Obj_AI_Hero>().Where(a => a.IsEnemy && a.Distance(Game.CursorPos) < 200 && a.IsValid && !a.IsDead);

            if (asec.Any())
            {
                return;
            }
            if (!LastClickBool || ClickCount == 0)
            {
                ClickCount++;
                LastClickPos          = Game.CursorPos;
                LastClickBool         = true;
                SelectedAllyAiMinion  = null;
                SelectedAllyAiMinionv = new Vector3();
                return;
            }

            if (ClickCounts == 0)
            {
                SelectedAllyAiMinionv = new Vector3();
            }


            if (LastClickBool && LastClickPos.Distance(Game.CursorPos) < 100)
            {
                ClickCount++;
                LastClickBool = false;
            }

            SelectedAllyAiMinion =
                ObjectManager.Get <Obj_AI_Base>()
                .Where(
                    x => x.IsValid && x.Distance(Game.CursorPos, true) < 40000 && x.IsAlly && !x.IsMe)
                .OrderBy(h => h.Distance(Game.CursorPos, true)).FirstOrDefault();
        }