Ejemplo n.º 1
0
 /// <returns> false if round can not be started, which means the game is lost, otherwise true</returns>
 public bool StartNextRound()
 {
     if (gameStatus == GameStatus.LOST)
     {
         return(false);
     }
     bm.GenerateNewLineOfBlocks();
     if (bm.checkIfLost() == false)
     {
         updateBallsAmount();
         SaveGame();
         return(true);
     }
     else // it s a lost game, end..
     {
         LostGame();
         return(false);
     }
 }
Ejemplo n.º 2
0
 public void Start()
 {
     bm = GameController.GetComponent <BlocksManager>();
     canvasGameOverModel.worldCamera = Camera.main;
     if (PlayerPrefs.HasKey(Key.GameIsSaved) == true)
     {
         Debug.Log("try load");
         bm.LoadBlocks();
     }
     else
     {
         Debug.Log("nothing to load");
         bm.GenerateNewLineOfBlocks();
     }
     bestScore   = ReadInteger(Key.BestScore);
     score       = ReadInteger(Key.LastScore);
     ballsAmount = ReadInteger(Key.BallAmount, InitalBallsAmount);
     updateBallsAmount();
     updateScore();
     updateBest();
 }