本文整理汇总了C#中Combatant.IsBlockEscape方法的典型用法代码示例。如果您正苦于以下问题:C# Combatant.IsBlockEscape方法的具体用法?C# Combatant.IsBlockEscape怎么用?C# Combatant.IsBlockEscape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Combatant
的用法示例。
在下文中一共展示了Combatant.IsBlockEscape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAction
//.........这里部分代码省略.........
else if(DataHolder.Item(action.useID).TargetAlly())
{
target = c.GetRandomTargetObject(allies);
}
}
if(target != null)
{
action.rayTargetSet = true;
action.rayPoint = DataHolder.Item(action.useID).targetRaycast.GetAIPoint(
c.prefabInstance, target);
}
}
}
else if(DataHolder.Item(action.useID).TargetAllyGroup() && c is Enemy)
{
action.targetID = BattleAction.ALL_ENEMIES;
}
else if(DataHolder.Item(action.useID).TargetAllyGroup() && c is Character)
{
action.targetID = BattleAction.ALL_CHARACTERS;
}
else if(DataHolder.Item(action.useID).TargetEnemyGroup() && c is Enemy)
{
action.targetID = BattleAction.ALL_CHARACTERS;
targetEnemy = true;
}
else if(DataHolder.Item(action.useID).TargetEnemyGroup() && c is Character)
{
action.targetID = BattleAction.ALL_ENEMIES;
targetEnemy = true;
}
else if(DataHolder.Item(action.useID).TargetSingleAlly())
{
if(valid == -2 || !DataHolder.BattleSystem().CheckForID(valid, allies,
!DataHolder.Item(action.useID).revive))
{
if(DataHolder.BattleSystem().IsRealTime())
{
action.targetID = c.GetNearestTarget(allies);
}
else
{
action.targetID = c.GetRandomTarget(allies);
}
}
}
else if(DataHolder.Item(action.useID).TargetSingleEnemy())
{
if(valid == -2 || !DataHolder.BattleSystem().CheckForID(valid, enemies, true))
{
if(DataHolder.BattleSystem().IsRealTime())
{
action.targetID = c.GetNearestTarget(enemies);
}
else
{
action.targetID = c.GetRandomTarget(enemies);
}
}
targetEnemy = true;
}
found = true;
}
else if(action.IsDefend() && !c.IsBlockDefend())
{
action.targetID = c.battleID;
found = true;
}
// set up escape
else if(action.IsEscape() && !c.IsBlockEscape())
{
action.targetID = c.battleID;
found = true;
}
else if(action.IsDeath() || action.IsNone())
{
action.targetID = c.battleID;
found = true;
}
// check active time
if(found)
{
if((DataHolder.BattleSystem().IsActiveTime() &&
c.usedTimeBar+action.GetTimeUse() > DataHolder.BattleSystem().maxTimebar) ||
(targetEnemy && enemies.Length == 0))
{
found = false;
targetEnemy = false;
action = new BattleAction();
}
else break;
}
}
}
}
if(!found) action = null;
return action;
}