public void gameTick() {
		if (player.isLevelAdvance()) {
			levelsCompleted++;
            totalPoint += temporaryPoint;
            temporaryPoint = 0;
			if (currentLevel.getNextLevel() == 0)
				gameCompleted = true;
			else {
				currentLevel = new Level(currentLevel.getNextLevel());
				player.setxCoord(currentLevel.getTileWidth()
                        * currentLevel.getStartX());
				player.setyCoord(currentLevel.getTileHeight()
                        * currentLevel.getStartY());
				player.setLevelAdvance(false);
			}
		} else {
			if (player.collisionAble()) {
				int beforeCollisionLife = player.getLife();
				currentLevel.collision(player);
				if (player.getLife() != beforeCollisionLife) { //Checks if the player lost any health
                    currentLevel.reset();
                    temporaryPoint = 0;
					player.setxCoord(currentLevel.getTileWidth()
                            * currentLevel.getStartX());
					player.setyCoord(currentLevel.getTileHeight()
                            * currentLevel.getStartY());
				}
			}
			if (!levelComplete()) {
                currentLevel.updateLevelIndex();
                temporaryPoint++;
            }
		}
	}