Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 KB | None | 0 0
  1.     void CheckIfFinished ()
  2.     {
  3.         if(foundations[0].GetComponent<Foundation>().CardsOnFoundation.Count == 13  &&
  4.            foundations[1].GetComponent<Foundation>().CardsOnFoundation.Count == 13  &&
  5.            foundations[2].GetComponent<Foundation>().CardsOnFoundation.Count == 13  &&
  6.            foundations[3].GetComponent<Foundation>().CardsOnFoundation.Count == 13 
  7.            )
  8.  
  9.          {
  10.             isGameFinish = true;
  11.             isfinalizing = false;
  12.             Generator.instance.stopUpdates = true;
  13.             StoreEndGameResults();
  14.             if(Hint.instance.autocomplete)
  15.             {
  16.                 //save a winnable match
  17.                 SaveEndedGame();
  18.                 NewMatchToSave ();
  19.             }
  20.             else
  21.             {
  22.                 SocialManager.instance.SendMessage("RecordAScore",(object) Points.instance.GetPoints());
  23.                 SocialManager.instance.SendMessage("UpgradeAchievement");
  24.                 ButtonsHandlerGame.instance.SetGameOverTexts(Points.instance.GetPoints().ToString(),TimerHandler.instance.GetTimeLabelText(),UndoHandler.undoHandler.moves.ToString());
  25.                 ButtonsHandlerGame.instance.ShowGameOver();
  26.                 ParticlesHandler.instance.ActiveParticles();
  27.                 // play sound
  28.                 SoundsManager.instance.PLAY_sound(SoundsManager.instance.sfx_game_over);
  29.             }
  30.  
  31.          }
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement