-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMoveToMouse.cs
More file actions
32 lines (27 loc) · 756 Bytes
/
Copy pathMoveToMouse.cs
File metadata and controls
32 lines (27 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using LeagueSharp;
using LeagueSharp.Common;
namespace SAwareness
{
internal class MoveToMouse
{
public MoveToMouse()
{
Game.OnGameUpdate += Game_OnGameUpdate;
}
~MoveToMouse()
{
Game.OnGameUpdate -= Game_OnGameUpdate;
}
public bool IsActive()
{
return Menu.Misc.GetActive() && Menu.MoveToMouse.GetActive();
}
private void Game_OnGameUpdate(EventArgs args)
{
if (!IsActive() || !Menu.MoveToMouse.GetMenuItem("SAwarenessMoveToMouseKey").GetValue<KeyBind>().Active)
return;
ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
}
}
}