Ejemplo n.º 1
0
    public IEnumerator ChallengeKillSum(int challengeIndex, int killGoal, bool isOneGame)
    {
        int helperInt = killSum;

        if (isOneGame)
        {
            while (!gameOver && killSum - helperInt < killGoal)
            {
                yield return(null);
            }
        }
        else
        {
            while (!gameOver && !isPaused && killSum - helperInt < killGoal)
            {
                yield return(null);
            }
        }
        if (killSum - helperInt >= killGoal)
        {
            challengeCont.ChallengeCompleted(challengeIndex);
        }
        else if (!isOneGame)
        {
            if (gameOver)
            {
                challengeCont.SetChallengeData(challengeIndex, killSum - helperInt);
            }
            else if (isPaused)
            {
                challengeCont.SetChallengeData(challengeIndex, killSum - helperInt);
            }
        }
    }
Ejemplo n.º 2
0
 public IEnumerator ChallengeDontGetHurt(int challengeIndex, int time)
 {
     while (gameCont.GetCurrentTime() < time && life >= defaultLife && !gameOver)
     {
         yield return(null);
     }
     if (life >= defaultLife && !gameOver)
     {
         challengeCont.ChallengeCompleted(challengeIndex);
     }
 }