本文整理汇总了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);
}
示例2: OrbwalkLRCLK_ValueChanged
public static void OrbwalkLRCLK_ValueChanged(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args)
{
if (args.NewValue)
{
LastClickPoint = Game.CursorPos.LSTo2D();
}
}
示例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();
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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];
}
}
示例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);
}
}
示例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());
}
}
示例10: SpellTester_SelectedSpellAngle_OnValueChange
private void SpellTester_SelectedSpellAngle_OnValueChange(ValueBase<int> sender,
ValueBase<int>.ValueChangeArgs args)
{
if (SelectedPoint != null)
{
SelectedPoint.Angle = sender.CurrentValue;
}
}
示例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());
}
}
示例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;
}
示例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);
}
示例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];
}
示例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;
}
}