本文整理汇总了C#中Vector3.IsWall方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3.IsWall方法的具体用法?C# Vector3.IsWall怎么用?C# Vector3.IsWall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vector3
的用法示例。
在下文中一共展示了Vector3.IsWall方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBestPosition
public static Vector3 GetBestPosition(AIHeroClient target, Vector3 firstPosition, Vector3 secondPosition)
{
if (firstPosition.IsWall() && !secondPosition.IsWall() &&
secondPosition.LSDistance(target.ServerPosition) < firstPosition.LSDistance(target.ServerPosition))
// if firstposition is a wall and second position isn't
{
return secondPosition; //return second position
}
if (secondPosition.IsWall() && !firstPosition.IsWall() &&
firstPosition.LSDistance(target.ServerPosition) < secondPosition.LSDistance(target.ServerPosition))
// if secondPosition is a wall and first position isn't
{
return firstPosition; // return first position
}
return firstPosition;
}
示例2: CastWard
private static void CastWard(Vector3 vector3)
{
var wardinrage = ObjectsManager.Wards.Any(ward => ward.IsInRange(vector3, 200));
var ally = EntityManager.Heroes.Allies.Any(a => a.IsInRange(vector3, 200) && a.IsValidTarget() && !a.IsMe);
var minion = EntityManager.MinionsAndMonsters.AlliedMinions.Any(m => m.IsInRange(vector3, 200) && m.IsValidTarget());
if (UseWardReady && UseWard.IsInRange(vector3) && (!user.ServerPosition.Extend(vector3, 75).IsWall() || !vector3.IsWall()) && !wardinrage && !ally && !minion
&& Core.GameTickCount - lastward > 1000)
{
UseWard.Cast(vector3);
lastward = Core.GameTickCount;
}
}
示例3: GetELandingPosition
//Credits to Honda (I think)
private static Vector3 GetELandingPosition()
{
Vector3 castPoint = Player.Distance(Game.CursorPos) <= _e.Range
? Game.CursorPos
: Player.Position.Extend(Game.CursorPos, _e.Range);
for (var i = 0; i < 500; i += 9)
for (double j = 0; j < 2 * Math.PI + 0.2; j += 0.2)
{
var c = new Vector3((castPoint.X + i * (float)Math.Cos(j)), castPoint.Y + i * (float)Math.Sin(j), castPoint.Z);
if (!c.IsWall())
return c;
}
return castPoint;
}