本文整理汇总了C#中Result.totalAmountOfBananas方法的典型用法代码示例。如果您正苦于以下问题:C# Result.totalAmountOfBananas方法的具体用法?C# Result.totalAmountOfBananas怎么用?C# Result.totalAmountOfBananas使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Result
的用法示例。
在下文中一共展示了Result.totalAmountOfBananas方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
// Update is called once per frame
void Update()
{
NormalGoal.getPercentageReachedBananas(playerStats);
if (!worldSpawner.goalReached)worldSpawner.setGoalReached(NormalGoal.isGoalReached(playerStats));
if (worldSpawner.endTileReached)
{
if (NormalGoal.nextLevel())
{
if (wait15Sec())
{
Application.LoadLevel(1);
}
else
{
if (playerStats.roundBananaRatio() >= 0) displayNumber = 0;
if (playerStats.roundBananaRatio() > 10) displayNumber = 1;
if (playerStats.roundBananaRatio() > 20) displayNumber = 2;
if (playerStats.roundBananaRatio() > 30) displayNumber = 3;
if (playerStats.roundBananaRatio() > 40) displayNumber = 4;
Destroy(GameObject.Find("HUD"));
NormalGoal.rounds++;
fullScreen.guiTexture.texture = BetweenScreens[displayNumber];
// display wait round screen
}
}
else
{
if (wait15Sec())
{
Destroy(GameObject.Find("KinectPointMan"));
Destroy(GameObject.Find("KinectPrefab"));
Destroy(GameObject.Find("GameSettings"));
Application.LoadLevel(0);
}
else
{
NormalGoal.rounds++;
if (!madeResults)
{
fullScreen.guiTexture.texture = goodScreen;
log = worldSpawner.log;
Result results = new Result(log);
int c = 0;
int[] ratios = new int[results.amountOfRounds*2];
foreach (RoundScore r in results.rounds)
{
ratios[(c * 2)] = r.getPickupRatio();
ratios[(c * 2) + 1] = r.getObstacleAvoidedRatio();
c++;
}
madeResults = true;
this.gameObject.GetComponent<mono_gmail>().mailStart(ratios,results.rounds[0].getStartTime(),results.totalAmountOfBananas(),results.totalAmountOfFeathers(),results.GetMostHitObstacle());
}
else
{
if (playerStats.roundBananaRatio() >= 0) displayNumber = 0;
if (playerStats.roundBananaRatio() > 10) displayNumber = 1;
if (playerStats.roundBananaRatio() > 20) displayNumber = 2;
if (playerStats.roundBananaRatio() > 30) displayNumber = 3;
if (playerStats.roundBananaRatio() > 40) displayNumber = 4;
Destroy(GameObject.Find("HUD"));
fullScreen.guiTexture.texture = EndScreens[displayNumber];
// goed gedaan screen
}
}
}
}
}