本文整理汇总了C#中AIHeroClient.GetDashInfo方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.GetDashInfo方法的具体用法?C# AIHeroClient.GetDashInfo怎么用?C# AIHeroClient.GetDashInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.GetDashInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleQ
private static void HandleQ(AIHeroClient comboTarget)
{
var QPrediction = spells[SpellSlot.Q].GetPrediction(comboTarget);
if (QPrediction.Hitchance >= HitChance.High)
{
if (spells[SpellSlot.Q].GetDamage(comboTarget) > comboTarget.Health + 15 &&
getCheckBoxItem(comboMenu, "dz191.bard.combo.qks"))
{
spells[SpellSlot.Q].Cast(QPrediction.CastPosition);
return;
}
var QPushDistance = getSliderItem(miscMenu, "dz191.bard.misc.distance");
var QAccuracy = getSliderItem(miscMenu, "dz191.bard.misc.accuracy");
var PlayerPosition = ObjectManager.Player.ServerPosition;
var BeamStartPositions = new List<Vector3>
{
QPrediction.CastPosition,
QPrediction.UnitPosition,
comboTarget.ServerPosition,
comboTarget.Position
};
if (comboTarget.IsDashing())
{
BeamStartPositions.Add(comboTarget.GetDashInfo().EndPos);
}
var PositionsList = new List<Vector3>();
var CollisionPositions = new List<Vector3>();
foreach (var position in BeamStartPositions)
{
var collisionableObjects = spells[SpellSlot.Q].GetCollision(position.LSTo2D(),
new List<Vector2> { position.LSExtend(PlayerPosition, -QPushDistance).LSTo2D() });
if (collisionableObjects.Any())
{
if (collisionableObjects.Any(h => h is AIHeroClient) &&
collisionableObjects.All(h => h.LSIsValidTarget()))
{
spells[SpellSlot.Q].Cast(QPrediction.CastPosition);
break;
}
for (var i = 0; i < QPushDistance; i += (int)comboTarget.BoundingRadius)
{
CollisionPositions.Add(position.LSExtend(PlayerPosition, -i));
}
}
for (var i = 0; i < QPushDistance; i += (int)comboTarget.BoundingRadius)
{
PositionsList.Add(position.LSExtend(PlayerPosition, -i));
}
}
if (PositionsList.Any())
{
//We don't want to divide by 0 Kappa
var WallNumber = PositionsList.Count(p => p.LSIsWall()) * 1.3f;
var CollisionPositionCount = CollisionPositions.Count;
var Percent = (WallNumber + CollisionPositionCount) / PositionsList.Count;
var AccuracyEx = QAccuracy / 100f;
if (Percent >= AccuracyEx)
{
spells[SpellSlot.Q].Cast(QPrediction.CastPosition);
}
}
}
else if (QPrediction.Hitchance == HitChance.Collision)
{
var QCollision = QPrediction.CollisionObjects;
if (QCollision.Count == 1)
{
spells[SpellSlot.Q].Cast(QPrediction.CastPosition);
}
}
}