• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ValueBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ValueBase的典型用法代码示例。如果您正苦于以下问题:C# ValueBase类的具体用法?C# ValueBase怎么用?C# ValueBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValueBase类属于命名空间,在下文中一共展示了ValueBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SkinManager_OnSkinSliderChange

 public static void SkinManager_OnSkinSliderChange(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
 {
     var model = GetModelByIndex(UtilityMenu.Skinmanager["skinmanager.models"].Cast<Slider>().CurrentValue);
     var skin = model.Skins[UtilityMenu.Skinmanager["skinmanager.skins"].Cast<Slider>().CurrentValue];
     UtilityMenu.Skinmanager["skinmanager.skins"].Cast<Slider>().DisplayName = "Skin - " + skin.Name;
     Player.SetSkinId(skin.Index);
 }
开发者ID:BEEBEEISADOG,项目名称:OKTRAIO,代码行数:7,代码来源:SkinManager.cs


示例2: OrbwalkLRCLK_ValueChanged

 public static void OrbwalkLRCLK_ValueChanged(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
 {
     if (args.NewValue)
     {
         LastClickPoint = Game.CursorPos.LSTo2D();
     }
 }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:7,代码来源:OrbwalkLastClick.cs


示例3: Interpolate

        /// <summary>
        /// 補間
        /// </summary>
        /// <param name="left"></param>
        /// <param name="leftKey"></param>
        /// <param name="right"></param>
        /// <param name="rightKey"></param>
        /// <returns></returns>
        protected override ReadOnlyCollection<ValueBase> Interpolate(
            ValueBase left, int leftKey, ValueBase right, int rightKey)
        {
            Value leftValue = (Value) left;
            Value rightValue = (Value) right;

            int count = rightKey - leftKey - 1;
            List<ValueBase> results = new List<ValueBase>( count );

            // 間のフレームの補間を生み出す
            Interpolater interporator = Interpolater.GetInterpolater( "linear" );
            for ( int i = 0; i < count; ++i ) {
                float[] lt = interporator.Interpolate( leftValue.lt, rightValue.lt, leftKey, rightKey, i + leftKey + 1 );
                float[] rt = interporator.Interpolate( leftValue.rt, rightValue.rt, leftKey, rightKey, i + leftKey + 1 );
                float[] lb = interporator.Interpolate( leftValue.lb, rightValue.lb, leftKey, rightKey, i + leftKey + 1 );
                float[] rb = interporator.Interpolate( leftValue.rb, rightValue.rb, leftKey, rightKey, i + leftKey + 1 );
                results.Add( new Value() {
                    lt = lt,
                    rt = rt,
                    lb = lb,
                    rb = rb
                } );
            }
            return results.AsReadOnly();
        }
开发者ID:cfm-art,项目名称:SpriteStudioPlayerForUGUI,代码行数:33,代码来源:VERT.cs


示例4: Program_PlaceWard_OnValueChange

 private static void Program_PlaceWard_OnValueChange(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
 {
     if (!Properties.GetData<bool>("Enable")) return;
     if (!args.OldValue && args.NewValue)
     {
         WardSpot spot;
         if (Wards.TryFindNearestSafeWardSpot(Game.CursorPos, out spot))
         {
             if (spot.ClickPosition.IsInRange(Player.Instance, 1100))
             {
                 var item = Wards.GetWardSlot();
                 if (item != null)
                 {
                     if(Player.CastSpell(item.SpellSlot, spot.ClickPosition))
                         Chat.Print(_placePinkWard ? "Placed pink ward!" : "Placed normal ward!");
                     return;
                 }
             }
             Player.IssueOrder(GameObjectOrder.MoveTo, spot.MovePosition, false);
             _placingWardSpot = spot;
         }else if (Wards.TryFindNearestWardSpot(Game.CursorPos, out spot))
         {
             var item = Wards.GetWardSlot();
             if (item != null)
                 Player.CastSpell(item.SpellSlot, spot.MagneticPosition);
         }
     }
 }
开发者ID:lolgamers55,项目名称:EloBuddy.Addons,代码行数:28,代码来源:Program.cs


示例5: SkinManager_OnModelSliderChange

 public void SkinManager_OnModelSliderChange(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
 {
     var model = GetModelByIndex(Menu["skinmanager.models"].Cast<Slider>().CurrentValue);
     Menu["skinmanager.models"].Cast<Slider>().DisplayName = "Model - " + model.Name;
     Player.SetModel(model.Name);
     Menu["skinmanager.skins"].Cast<Slider>().CurrentValue = 0;
     Menu["skinmanager.skins"].Cast<Slider>().MaxValue = model.Skins.Length - 1;
 }
开发者ID:bruno105,项目名称:OKTRAIO,代码行数:8,代码来源:SkinManager.cs


示例6: SkinManager_OnResetModel

        public static void SkinManager_OnResetModel(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
        {
            UtilityMenu.Skinmanager["skinmanager.models"].Cast<Slider>().CurrentValue = Array.IndexOf(ModelNames,
                Player.Instance.ChampionName);

            if (UtilityMenu.Skinmanager["skinmanager.resetModel"].Cast<CheckBox>().CurrentValue)
                UtilityMenu.Skinmanager["skinmanager.resetModel"].Cast<CheckBox>().CurrentValue = false;
        }
开发者ID:BEEBEEISADOG,项目名称:OKTRAIO,代码行数:8,代码来源:SkinManager.cs


示例7: SpellTester_SelectedSpellIndex_OnValueChange

 private void SpellTester_SelectedSpellIndex_OnValueChange(ValueBase<int> sender,
     ValueBase<int>.ValueChangeArgs args)
 {
     if (SelectedPoints.Count > 0)
     {
         SelectedPoint = SelectedPoints[Config.Properties.GetData<int>("SpellTester_SelectedSpellIndex") - 1];
     }
 }
开发者ID:lolgamers55,项目名称:EloBuddy.Addons,代码行数:8,代码来源:SpellTester.cs


示例8: SkinHax_OnValueChanged

 public static void SkinHax_OnValueChanged(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
 {
     if (Config.Modes.Draw.UseHax)
     {
         Config.Modes.Draw._skinhax.DisplayName =
             Config.Modes.Draw.skinName[Config.Modes.Draw._skinhax.CurrentValue];
         Player.Instance.SetSkin(Player.Instance.ChampionName, args.NewValue);
     }
 }
开发者ID:strcow,项目名称:Hi-Im-Ezreal,代码行数:9,代码来源:GameEvent.cs


示例9: OnFlash

 private static void OnFlash(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
 {
     if (Flash.IsReady() && args.NewValue)
     {
         Notifications.Show(new SimpleNotification("Flash Assistant", "NOOOOOOOOOOOOB!"));
         var position = Player.Instance.ServerPosition.Extend(Game.CursorPos, Flash.Range);
         Flash.Cast(position.To3DWorld());
     }
 }
开发者ID:FireBuddy,项目名称:EloBuddy-2,代码行数:9,代码来源:Program.cs


示例10: SpellTester_SelectedSpellAngle_OnValueChange

        private void SpellTester_SelectedSpellAngle_OnValueChange(ValueBase<int> sender,
            ValueBase<int>.ValueChangeArgs args)
        {
            if (SelectedPoint != null)
            {
                SelectedPoint.Angle = sender.CurrentValue;
            }

        }
开发者ID:lolgamers55,项目名称:EloBuddy.Addons,代码行数:9,代码来源:SpellTester.cs


示例11: OnFlash

 private static void OnFlash(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
 {
     if (UtilityManager.Activator.Flash.IsReady() && args.NewValue)
     {
         var position = Player.Instance.ServerPosition.Extend(Game.CursorPos,
             UtilityManager.Activator.Flash.Range);
         UtilityManager.Activator.Flash.Cast(position.To3DWorld());
     }
 }
开发者ID:FireBuddy,项目名称:EloBuddy-2,代码行数:9,代码来源:FlashAssistant.cs


示例12: RecallTracker_OnReset

        private void RecallTracker_OnReset(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
        {
            HackMenu["recallx"].Cast<Slider>().CurrentValue = 645;
            HackMenu["recally"].Cast<Slider>().CurrentValue = 860;
            HackMenu["recallwidth"].Cast<Slider>().CurrentValue = 465;

            if (HackMenu["resetPos"].Cast<CheckBox>().CurrentValue)
                HackMenu["resetPos"].Cast<CheckBox>().CurrentValue = false;
        }
开发者ID:globalik,项目名称:EloBuddy,代码行数:9,代码来源:RecallTracker.cs


示例13: ExtendedZoomValue_OnValueChange

        private static void ExtendedZoomValue_OnValueChange(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
        {
            if (!_config["ExtendedZoom"].Cast<KeyBind>().CurrentValue)
            {
                return;
            }

            Camera.SetZoomDistance(args.NewValue);
        }
开发者ID:ss841122,项目名称:EloBuddy,代码行数:9,代码来源:Program.cs


示例14: Slider_OnValueChange

        private static void Slider_OnValueChange(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
        {
            List<string> colorList = new List<string>();

            foreach (PropertyInfo info in typeof(Color).GetProperties())
                if(!badNames.Contains(info.Name))
                    colorList.Add(info.Name);

            ((Slider)sender).DisplayName = "Shroom Color: " + colorList[((Slider)sender).CurrentValue];
        }
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:10,代码来源:Program.cs


示例15: SelfW_OnValueChanged

        public static void SelfW_OnValueChanged(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
        {
            if (args.NewValue && SpellManager.W.IsReady() && SpellManager.E.IsReady())
            {
                var tempPos = Game.CursorPos;

                ObjectManager.Player.Spellbook.CastSpell(SpellSlot.W, tempPos);
                ObjectManager.Player.Spellbook.CastSpell(SpellSlot.E, tempPos);
                Config.Modes.Misc._SelfW.CurrentValue = false;
            }
        }
开发者ID:strcow,项目名称:Hi-Im-Ezreal,代码行数:11,代码来源:GameEvent.cs


示例16: OffsetOnOnValueChange

 private static void OffsetOnOnValueChange(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
 {
     if (sender.SerializationId == Program.BaseUltMenu["x"].Cast<Slider>().SerializationId)
     {
         UpdateOffset(args.NewValue);
     }
     else
     {
         UpdateOffset(0, args.NewValue);
     }
 }
开发者ID:elosupport,项目名称:Korean,代码行数:11,代码来源:OfficialAddon.cs


示例17: en_OnValueChange

 static void en_OnValueChange(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
 {
     if (args.NewValue == false)
     {
         foreach (Champ ch in champions)
             ch.Kill();
         Drawing.OnEndScene -= Drawing_OnEndScene;
         Game.OnUpdate -= Game_OnUpdate;
     }
     else
         Init();
 }
开发者ID:KoalaHuman,项目名称:EloBuddy-2,代码行数:12,代码来源:Program.cs


示例18: kb_OnValueChange

 private void kb_OnValueChange(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
 {
     if (args.NewValue)
     {
         selectedObject = null;
     }
     else if (nearbyObjects.Any())
     {
         selectedObject = nearbyObjects.First();
         RefreshText();
     }
 }
开发者ID:qkwlqk,项目名称:EloBuddy,代码行数:12,代码来源:ObjectSelector.cs


示例19: s_OnValueChange

 private void s_OnValueChange(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
 {
     if (args.NewValue != 5 && args.NewValue != 0 && !cus.canLvl((SkillToLvl) args.NewValue, level))
     {
         s.CurrentValue = 0;
     }
     else
     {
         cus.SetSkill(level, (SkillToLvl) args.NewValue);
         sender.DisplayName = skills[args.NewValue];
     }
 }
开发者ID:qkwlqk,项目名称:EloBuddy,代码行数:12,代码来源:LvlSlider.cs


示例20: ToggleKey_OnValueChange

        private static void ToggleKey_OnValueChange(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
        {
            KeyBind keybind = sender as KeyBind;
            if(keybind.CurrentValue == true)
            {
                Slider slider = menu.Get<Slider>("Card Slider");

                if (slider.CurrentValue == 2)
                    slider.CurrentValue = 0;
                else
                    slider.CurrentValue = slider.CurrentValue + 1;
            }
        }
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:13,代码来源:Program.cs



注:本文中的ValueBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ValueChangedEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# Value类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap