本文整理汇总了C#中GameObject.IsWard方法的典型用法代码示例。如果您正苦于以下问题:C# GameObject.IsWard方法的具体用法?C# GameObject.IsWard怎么用?C# GameObject.IsWard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObject
的用法示例。
在下文中一共展示了GameObject.IsWard方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Obj_Ward_OnCreate
private static void Obj_Ward_OnCreate(GameObject sender, EventArgs args)
{
if (sender.IsWard())
{
var ward = sender as Obj_AI_Minion;
_wardsAvailable.Add(ward);
LastWardCreated = Game.Time;
if (IsTryingToJump)
{
if (ward != null &&
_lastWardJumpVector.To2D().Distance(ward.Position.To2D(), true) < Math.Pow(80, 2))
{
SpellManager.CastW1(ward);
}
}
}
}
示例2: Obj_Ward_OnDelete
private static void Obj_Ward_OnDelete(GameObject sender, EventArgs args)
{
if (sender.IsWard())
{
var ward = sender as Obj_AI_Minion;
_wardsAvailable.RemoveAll(m => ward != null && m.NetworkId == ward.NetworkId);
}
}
示例3: Obj_Ward_OnDelete
private static void Obj_Ward_OnDelete(GameObject sender, EventArgs args)
{
if (sender.IsWard())
{
var ward = sender as Obj_AI_Minion;
var ward2 = WardsAvailable.Where(m => m.NetworkId == ward.NetworkId).FirstOrDefault();
if (ward2 != null)
{
WardsAvailable.Remove(ward2);
}
}
}