Beispiel #1
0
    void ChallengeUpdate()
    {
        if (feedbackAnimation)
        {
            if (flashFeedback.update(Time.deltaTime, feedbackTo))
            {
                feedbackAnimation = false;
                if (challengeCompleted)
                {
                    challengeCompleted = false;
                    currentStep        = Step.End;
                }
            }
        }

        if (newActivePlayer == true) // Someone else scanned in!
        {
            allowNewPlayer  = false;
            newActivePlayer = false;
            Player supportPlayer = GetPlayer();

            Debug.Log(supportPlayer.shardAffinity);

            if (activeChallenge.getChallengeColor() == ShardManager.Add(supportPlayer.shardAffinity, activePlayer.shardAffinity))
            {
                // Mix is effective, reward players
                feedbackAnimation  = true;
                feedbackTo         = flashFeedback.affirmative;
                challengeCompleted = true;
            }
            else
            {
                // Mix is not effective, try again
                feedbackAnimation = true;
                feedbackTo        = flashFeedback.denial;
                allowNewPlayer    = true;
            }
        }
    }
Beispiel #2
0
 public ShardColor getChallengeColor()
 {
     return(ShardManager.Add(playerColor, supportColor));
 }