コード例 #1
0
        public void Dispose()
        {
            Fog.SetValue(1);
            Filtering.SetValue(0);
            ParticleHack.SetValue(1);

            FogItem.PropertyChanged          -= FogItemChanged;
            FilteringItem.PropertyChanged    -= FilteringItemChanged;
            ParticleHackItem.PropertyChanged -= ParticleHackItemChanged;
        }
コード例 #2
0
        public ConsoleCommands(MenuFactory MenuFactory)
        {
            var ConsoleCommandsMenu = MenuFactory.Menu("Console Commands");

            FogItem          = ConsoleCommandsMenu.Item("Fog Disable", true);
            FilteringItem    = ConsoleCommandsMenu.Item("Filtering Disable", true);
            ParticleHackItem = ConsoleCommandsMenu.Item("Particle Hack Enable", true);

            Fog = Game.GetConsoleVar("fog_enable");
            Fog.SetValue(Convert.ToInt32(!FogItem.Value));

            Filtering = Game.GetConsoleVar("fow_client_nofiltering");
            Filtering.SetValue(Convert.ToInt32(FilteringItem.Value));

            ParticleHack = Game.GetConsoleVar("dota_use_particle_fow");
            ParticleHack.SetValue(Convert.ToInt32(!ParticleHackItem.Value));

            FogItem.PropertyChanged          += FogItemChanged;
            FilteringItem.PropertyChanged    += FilteringItemChanged;
            ParticleHackItem.PropertyChanged += ParticleHackItemChanged;
        }
コード例 #3
0
 private void FogItemChanged(object sender, PropertyChangedEventArgs e)
 {
     Fog.SetValue(Convert.ToInt32(!FogItem.Value));
 }