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

I'm getting a bug where recoverPoints resets to 5000 everytime I die. #1

Open
geralddzx opened this issue Feb 11, 2018 · 4 comments
Open

Comments

@geralddzx
Copy link

self.recoverPoints = 5000

@geralddzx geralddzx changed the title I think this should be self.recoverPoints = params.recoverPoints, I'm getting a bug where recoverPoints resets to 5000 everytime I die. I think this should be. I'm getting a bug where recoverPoints resets to 5000 everytime I die. Feb 11, 2018
@geralddzx
Copy link
Author

I think this should be. self.recoverPoints = params.recoverPoints

@geralddzx geralddzx changed the title I think this should be. I'm getting a bug where recoverPoints resets to 5000 everytime I die. I'm getting a bug where recoverPoints resets to 5000 everytime I die. Feb 11, 2018
@fontinixxl
Copy link

I agree with you @geralddzx I figured out the same and that is the way I fixed as well.

@lstanard
Copy link

lstanard commented May 7, 2020

You need to have an initial value of some sort otherwise you can never recover health as params.recoverPoints is initially nil

self.recoverPoints = params.recoverPoints and params.recoverPoints or 5000

@edischin
Copy link

Initial value can be set in PaddleSelectState when it changes to ServeState, beginning a new game. PlayState would then receive recoverPoints in params, as mentioned by @geralddzx and @fontinixxl .

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

4 participants