本文整理汇总了C#中Combatant.IsBlockItems方法的典型用法代码示例。如果您正苦于以下问题:C# Combatant.IsBlockItems方法的具体用法?C# Combatant.IsBlockItems怎么用?C# Combatant.IsBlockItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Combatant
的用法示例。
在下文中一共展示了Combatant.IsBlockItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAction
//.........这里部分代码省略.........
else if(DataHolder.Skill(action.useID).TargetSingleAlly())
{
if(valid == -2 || !DataHolder.BattleSystem().CheckForID(valid, allies,
!DataHolder.Skill(action.useID).level[action.useLevel].revive))
{
if(c.aiNearestTarget)
{
action.targetID = c.GetNearestTarget(allies);
}
else
{
action.targetID = c.GetRandomTarget(allies);
}
}
}
else if(DataHolder.Skill(action.useID).TargetSingleEnemy())
{
if(valid == -2 || !DataHolder.BattleSystem().CheckForID(valid, enemies, true))
{
if(c.aiNearestTarget)
{
action.targetID = c.GetNearestTarget(enemies);
}
else
{
action.targetID = c.GetRandomTarget(enemies);
}
}
targetEnemy = true;
}
found = true;
}
// set up item
else if(action.IsItem() && !c.IsBlockItems() &&
(!(c is Character) || GameHandler.HasItem(this.useID[i], 1)))
{
action.useID = this.useID[i];
if(DataHolder.Item(action.useID).TargetSelf())
{
action.targetID = c.battleID;
}
else if(DataHolder.Item(action.useID).TargetNone())
{
action.targetID = BattleAction.NONE;
if(DataHolder.Item(action.useID).targetRaycast.active)
{
GameObject target = null;
if(c.aiNearestTarget)
{
if(DataHolder.Item(action.useID).TargetEnemy())
{
target = c.GetNearestTargetObject(enemies);
}
else if(DataHolder.Item(action.useID).TargetAlly())
{
target = c.GetNearestTargetObject(allies);
}
}
else
{
if(DataHolder.Item(action.useID).TargetEnemy())
{
target = c.GetRandomTargetObject(enemies);
}
else if(DataHolder.Item(action.useID).TargetAlly())
{