martaczaska

GameStatus

Dec 30th, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. package pl.gda.biomed.wjp;
  2.  
  3. /**
  4.  * Klasa pomocnicza z zapisem stanu gry
  5.  * @author Jacek Rumiński
  6.  */
  7. class GameStatus{
  8.     /** Liczba zgromadzonych punktów na danynm poziomie*/
  9.     public int points;
  10.     /** Numer poziomu */
  11.     public int level;
  12.     /** Czas gry na danym poziomie*/  
  13.     public double time;
  14.    
  15.     /**
  16.      * Zeruj parametry gry
  17.      */
  18.     public void reset(){
  19.         points=0;
  20.         level=1;
  21.         time=0.0;
  22.     }//reset()
  23.     /**
  24.      * Zeruj licznę punktów
  25.      */
  26.     public void resetPoints(){
  27.         points=0;
  28.     }//resetPoints()
  29.     /**
  30.      * Zwiększ wskaźnik poziomu
  31.      */
  32.     public void nextLevel(){
  33.         level++;
  34.     }//nextLevel()
  35. }//koniec class GameStatus
Advertisement
Add Comment
Please, Sign In to add comment