示例#1
0
 /// <summary>
 ///     Creates a new instance of an OrbwalkerMode using a new Keybind
 /// </summary>
 public OrbwalkerMode(
     string name,
     KeyCode key,
     TargetDelegate targetDelegate,
     OrbwalkModeDelegate orbwalkBehaviour)
 {
     this.Name                    = name ?? throw new Exception("There was an error creating the Orbwalker Mode");
     this.ModeBehaviour           = orbwalkBehaviour;
     this.GetTargetImplementation = targetDelegate;
     this.MenuItem                = new MenuKeyBind(name, name, key, KeybindType.Press);
 }
示例#2
0
        /// <summary>
        ///     Creates a new instance of an OrbwalkerMode using a Global Key
        /// </summary>
        public OrbwalkerMode(string name, GlobalKey key, TargetDelegate targetDelegate, OrbwalkModeDelegate orbwalkBehaviour)
        {
            if (name == null || key == null)
            {
                throw new Exception("There was an error creating the Orbwalker Mode");
            }

            this.Name                    = name;
            this.ModeBehaviour           = orbwalkBehaviour;
            this.GetTargetImplementation = targetDelegate;
            this.MenuItem                = key.KeyBindItem;
            key.Activate();
            this.UsingGlobalKey = true;
        }
示例#3
0
        /// <summary>
        ///     Creates a new instance of an OrbwalkerMode using a new Keybind
        /// </summary>
        public OrbwalkerMode(
            string name,
            KeyCode key,
            TargetDelegate targetDelegate,
            OrbwalkModeDelegate orbwalkBehaviour)
        {
            this.Name                    = name ?? throw new Exception("There was an error creating the Orbwalker Mode");
            this.ModeBehaviour           = orbwalkBehaviour;
            this.GetTargetImplementation = targetDelegate;
            this.MenuItem                = new MenuKeyBind(name, name, key, KeybindType.Press);


            this.ModeMenu = new Menu($"orbmode.{name}", name)
            {
                new MenuBool($"orbmode.{name}.move", "Movement"),
                new MenuBool($"orbmode.{name}.attack", "Attacking")
            };
        }
示例#4
0
        /// <summary>
        ///     Creates a new instance of an OrbwalkerMode using a Global Key
        /// </summary>
        public OrbwalkerMode(
            string name,
            GlobalKey key,
            TargetDelegate targetDelegate,
            OrbwalkModeDelegate orbwalkBehaviour)
        {
            if (name == null || key == null)
            {
                throw new Exception("There was an error creating the Orbwalker Mode");
            }

            this.Name                    = name;
            this.ModeBehaviour           = orbwalkBehaviour;
            this.GetTargetImplementation = targetDelegate;
            this.MenuItem                = key.KeyBindItem;
            key.Activate();
            this.UsingGlobalKey = true;

            this.ModeMenu = new Menu($"orbmode.{name}", name)
            {
                new MenuBool($"orbmode.{name}.move", "Movement"),
                new MenuBool($"orbmode.{name}.attack", "Attacking")
            };
        }