本文整理汇总了C#中LeagueSharp.Cast方法的典型用法代码示例。如果您正苦于以下问题:C# LeagueSharp.Cast方法的具体用法?C# LeagueSharp.Cast怎么用?C# LeagueSharp.Cast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeagueSharp
的用法示例。
在下文中一共展示了LeagueSharp.Cast方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastSpell
public static void CastSpell(LeagueSharp.Common.Spell QWER, AIHeroClient target)
{
// Chat.Print("CastSpell");
if (getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 2)
{
// Chat.Print("SDK");
SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
bool aoe2 = false;
if (QWER.Type == LeagueSharp.Common.SkillshotType.SkillshotCircle)
{
//CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
//aoe2 = true;
}
if (QWER.Width > 80 && !QWER.Collision)
aoe2 = true;
var predInput2 = new SebbyLib.Movement.PredictionInput
{
Aoe = aoe2,
Collision = QWER.Collision,
Speed = QWER.Speed,
Delay = QWER.Delay,
Range = QWER.Range,
From = ThreshWarden.Player.ServerPosition,
Radius = QWER.Width,
Unit = target,
Type = CoreType2
};
var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);
//var poutput2 = QWER.GetPrediction(target);
if (QWER.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(ThreshWarden.Player.ServerPosition, poutput2.CastPosition))
return;
if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 0)
{
if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
QWER.Cast(poutput2.CastPosition);
else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
{
QWER.Cast(poutput2.CastPosition);
}
}
else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 1)
{
if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
QWER.Cast(poutput2.CastPosition);
}
else if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 2)
{
if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
QWER.Cast(poutput2.CastPosition);
}
}
else
if(ThreshWarden.getBoxItem(ThreshWarden.PredictConfig, "PredictionMode") == 1)
{
// Chat.Print("OKTW");
SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
bool aoe2 = false;
if (QWER.Type == LeagueSharp.Common.SkillshotType.SkillshotCircle)
{
CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
aoe2 = true;
}
if (QWER.Width > 80 && !QWER.Collision)
aoe2 = true;
var predInput2 = new SebbyLib.Prediction.PredictionInput
{
Aoe = aoe2,
Collision = QWER.Collision,
Speed = QWER.Speed,
Delay = QWER.Delay,
Range = QWER.Range,
From = ThreshWarden.Player.ServerPosition,
Radius = QWER.Width,
Unit = target,
Type = CoreType2
};
var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);
//var poutput2 = QWER.GetPrediction(target);
if (QWER.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(ThreshWarden.Player.ServerPosition, poutput2.CastPosition))
return;
if (getBoxItem(ThreshWarden.PredictConfig, "HitChance") == 0)
{
if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
QWER.Cast(poutput2.CastPosition);
else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
{
//.........这里部分代码省略.........
示例2: CastR
private static void CastR(LeagueSharp.Common.Spell R, AIHeroClient t)
{
Program.CastSpell(R, t);
if (getCheckBoxItem(rMenu, "minionR"))
{
// collision + predictio R
var poutput = R.GetPrediction(t);
var col = poutput.CollisionObjects.Count(ColObj => ColObj.IsEnemy && ColObj.IsMinion && !ColObj.IsDead);
//hitchance
var prepos = LeagueSharp.Common.Prediction.GetPrediction(t, 0.4f);
if (col == 0 && (int)prepos.Hitchance < 5)
return;
float rSplash = 140;
if (bonusR)
rSplash = 290f;
var minions = Cache.GetMinions(Player.ServerPosition, R.Range - rSplash);
foreach (var minion in minions.Where(minion => minion.LSDistance(poutput.CastPosition) < rSplash))
{
R.Cast(minion);
return;
}
}
}
示例3: SebbySpell
private static void SebbySpell(LeagueSharp.Common.Spell QR, Obj_AI_Base target)
{
SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
bool aoe2 = false;
if (QR.Type == SkillshotType.SkillshotCircle)
{
CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
aoe2 = true;
}
if (QR.Width > 80 && !QR.Collision)
aoe2 = true;
var predInput2 = new SebbyLib.Prediction.PredictionInput
{
Aoe = aoe2,
Collision = QR.Collision,
Speed = QR.Speed,
Delay = QR.Delay,
Range = QR.Range,
From = Player.ServerPosition,
Radius = QR.Width,
Unit = target,
Type = CoreType2
};
var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);
if (QR.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
return;
if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 0)
{
if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
QR.Cast(poutput2.CastPosition);
}
else if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 1)
{
if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
QR.Cast(poutput2.CastPosition);
}
else if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 2)
{
if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
QR.Cast(poutput2.CastPosition);
}
}