예제 #1
0
 private void SetActiveCustomOrbwalker(List <IOrbwalkingMode> orbwalkingModes)
 {
     this.orbwalkerCombo = orbwalkingModes.Skip(this.customOrbwalkerIndex).FirstOrDefault();
     if (this.orbwalkerCombo != null)
     {
         Game.PrintMessage($"Selected <font color='#FF5050'>{this.orbwalkerCombo}</font> orbwalker");
     }
 }
예제 #2
0
        public void RegisterMode(IOrbwalkingMode mode)
        {
            if (this.Modes.Any(e => e == mode))
            {
                return;
            }

            Log.Info($"Register Mode {mode}");
            this.Modes.Add(mode);
            mode.Activate();
        }
예제 #3
0
        public void UnregisterMode(IOrbwalkingMode mode)
        {
            var oldMode = this.Modes.FirstOrDefault(e => e == mode);

            if (oldMode != null)
            {
                mode.Deactivate();
                this.Modes.Remove(oldMode);

                Log.Info($"Unregister Mode {mode}");
            }
        }
예제 #4
0
        protected override void OnActivate()
        {
            this.config = new ControllerConfig();

            this.controller       = new Controller((UserIndex)this.config.ControllerIndex);
            this.orbwalkerFarm    = this.orbwalker.Value.OrbwalkingModes.First(x => x.Value.ToString().EndsWith("Farm")).Value;
            this.orbwalkerPush    = this.orbwalker.Value.OrbwalkingModes.First(x => x.Value.ToString().EndsWith("Push")).Value;
            this.orbwalkerSupport = this.orbwalker.Value.OrbwalkingModes.First(x => x.Value.ToString().EndsWith("Support")).Value;
            this.orbwalkerCombo   = this.orbwalker.Value.CustomOrbwalkingModes.FirstOrDefault();

            UpdateManager.Subscribe(this.OnVibrationUpdate, 125);
            UpdateManager.BeginInvoke(this.OnUpdate);
            this.config.ControllerIndexChanged += this.ControllerIndexChanged;

            Entity.OnInt32PropertyChange += this.OnVibrationCheck;

            Game.ExecuteCommand("dota_camera_lock 1");
        }