コード例 #1
0
ファイル: Aimbot.cs プロジェクト: vnhaxnet/ExCheat
        public static void SetViewAngles(Rotator ang)
        {
            if (ang == new Rotator(0, 0, 0))
            {
                return;
            }
            if (MouseAim)
            {
                Vector2 Aim   = Main.cameraManager.WorldToScreen(ang.ToVector(), screensize);
                var     point = new System.Drawing.Point((int)Aim.X, (int)Aim.Y);

                var delay = TimeSpan.FromMilliseconds(1);

                CursorMover.MoveCursor(point, delay);
            }
            else
            {
                if (aimbot)
                {
                    Main.LocalPlayer.SetViewAngles(ang);
                }
            }
            if (SilentAim)
            {
                Main.playerController.SetViewAngles(ang);
            }
        }
コード例 #2
0
 void Start()
 {
     allowedToCreateCharacter = false;
     cm = cursor.GetComponent <CursorMover>();
     selectedGameObject = cm.GetSelectedOption();
     selectedCharacter  = selectedGameObject;
     selectedText       = selectedGameObject.GetComponent <Text>();
     //    selectedSlot = 0;
 }
コード例 #3
0
    void Awake()
    {
        prefabHandler = GameObject.Find("StatusBoxHandler").GetComponent <MenuPrefabHandler>();
        menuHandler   = GameObject.Find("MenuHandler").GetComponent <MenuHandler>();
        cursor        = gameObject;
        string parent = cursor.transform.parent.name;

        cm             = gameObject.GetComponent <CursorMover>();
        selectedOption = cm.GetSelectedOption();
        menuHandler.SetCursor(cursor);
    }
コード例 #4
0
        public void TestRuntime(int x, int y, int milliseconds)
        {
            var point     = new Point(x, y);
            var stopwatch = Stopwatch.StartNew();

            CursorMover.MoveCursor(point, TimeSpan.FromMilliseconds(milliseconds));
            stopwatch.Stop();

            // The runtime duration needs to be buffered to account for the movement initialisation

            Assert.InRange(stopwatch.ElapsedMilliseconds, milliseconds, milliseconds + _runtimeBuffer);
        }
コード例 #5
0
ファイル: CursorMoverTests.cs プロジェクト: xoSnowox/Kalon
        public void TestDelay(int x, int y, int milliseconds)
        {
            var point = new Point(x, y);

            var stopwatch = Stopwatch.StartNew();

            CursorMover.MoveCursor(point, TimeSpan.FromMilliseconds(milliseconds));

            stopwatch.Stop();

            Assert.InRange(stopwatch.ElapsedMilliseconds, milliseconds, milliseconds + 80);
        }
コード例 #6
0
        public void TestMovement(int x, int y)
        {
            var point = new Point(x, y);

            CursorMover.MoveCursor(point, TimeSpan.FromMilliseconds(1));

            if (!User32.GetCursorPos(out var currentCursorPosition))
            {
                throw new Win32Exception();
            }

            Assert.Equal(point, currentCursorPosition);
        }
コード例 #7
0
 // Use this for initialization
 void Awake()
 {
     reachedMaxStats = false;
     //      selectedSlot = characterSelect.GetSelectedCharacter();
     handler = GameObject.Find("StatusBoxHandler");
     characterMenuPrefabHandler = handler.GetComponent <CharacterMenuPrefabHandler>();
     animator          = gameObject.GetComponent <Animator>();
     cursorInput       = gameObject.GetComponent <CursorInput>();
     cm                = gameObject.GetComponent <CursorMover>();
     animator.enabled  = false;
     statSelected      = false;
     statCounter       = int.Parse(statsLeft.GetComponent <Text>().text);
     totalStatsAllowed = (ushort)(statCounter + 5);
 }