Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always displaying Level 32 (breakout 13) #10

Open
RobotWizard11 opened this issue May 18, 2020 · 1 comment
Open

Always displaying Level 32 (breakout 13) #10

RobotWizard11 opened this issue May 18, 2020 · 1 comment

Comments

@RobotWizard11
Copy link

Whenever I start the game, the level is always 32. If I die or beat the level, it still says Level 32. Is there a way to fix this?

Screenshot 2020-05-18 20 50 39

@edischin
Copy link

In PaddleSelectState you may notice that the level is fixed on the state change to "serve". You can just set it up to 1 in "bricks" and "level".
gStateMachine:change('serve', { paddle = Paddle(self.currentPaddle), bricks = LevelMaker.createMap(32), health = 3, score = 0, highScores = self.highScores, level = 32, recoverPoints = 5000 })

Regarding the level progression, I suggest you to check if level is being increased when VictoryState changes to ServeState:
gStateMachine:change('serve', { level = self.level + 1, bricks = LevelMaker.createMap(self.level + 1), paddle = self.paddle, health = self.health, score = self.score, highScores = self.highScores, recoverPoints = self.recoverPoints })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants