Example #1
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;
        }
Example #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;

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