本文整理汇总了C#中Party.getTurnOrder方法的典型用法代码示例。如果您正苦于以下问题:C# Party.getTurnOrder方法的具体用法?C# Party.getTurnOrder怎么用?C# Party.getTurnOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Party
的用法示例。
在下文中一共展示了Party.getTurnOrder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: startBattle
// Methods
/*Start Battle Method Outline */
/* 1) Get good and bad guys.
* 2) Create an array that can hold all characters.
* 3) Sort array by agility.
* 4) Loop through array, giving each character a turn. Start over at the first element you the last goes.(L)
* 5) For each players turn, MATH and handle choices. (F)
* 6) If a player character defeats an enemy, call the gainExperience method of the character and send the worth of the enemy it defeated.
*/
public void startBattle()
{
mGoodGuys = mGame.getParty();
mBadGuys = new EnemyFactory().getEnemyParty(mGoodGuys.getLevel());
turnOrder = mGoodGuys.getTurnOrder(mBadGuys);
selectFirstCharacter();
while(!battleOver())
{
if (currentActor.mIsPlayer)
{
executeAction(mGame.getPlayerAction());
}
else
{
executeAction(currentActor.mAI.ai(turnOrder));
}
}
}