当前位置: 首页>>代码示例>>C#>>正文


C# ValueBase类代码示例

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


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


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