Esempio n. 1
0
 public void GoalScoredForTeam(TeamManager scored)
 {
     ball.HandleGoalScore(scored.teamColor);
     goal?.StopTeamSwitching();
     foreach (TeamManager team in teams)
     {
         if ((Color)team.teamColor == scored.teamColor)
         {
             team.IncrementScore();
             TeamManager winningTeam = TopTeam();
             if (winningTeam != null)
             {
                 backgroundScroller.SetBackground(winningTeam.resources);
             }
             else
             {
                 backgroundScroller.SetBackground(neutralResources);
             }
             ScoreChanged();
         }
         else
         {
             team.MakeInvisibleAfterGoal();
         }
     }
     if (!TutorialLiveClips.runningLiveClips)
     {
         UtilityExtensionsContainer.TimeDelayCall(
             this, ResetGameAfterGoal, pauseAfterGoalScore);
     }
     cameraShake.shakeAmount   = Settings.GoalShakeAmount;
     cameraShake.shakeDuration = Settings.GoalShakeDuration;
 }