[Feature]: Update the life system design#84
Merged
jvondermarck merged 1 commit intojvondermarck:mainfrom Oct 15, 2022
Merged
Conversation
Contributor
Author
|
Sorry for the weird PR name💀. |
Contributor
Author
|
Again, sorry for closing this branch accidently💀 |
Owner
|
Hi, it's awesome, great work !! Thank you. Feel free to create new issues in the project to still continue improve the game. Thanks. |
Contributor
Author
|
Thank you soo much. This counts as my first ever opensource contribution and I am glad it was this game. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👉 Checklist
✍ Description of the Pull Request
Added a redesigned Lives system with hearts instead of plain numbers
First of all, sorry for soo many chances, these were actually made by VS Code auto code beautifier; Hence a lot of indentation and other difference. But the major change is in only 2 files, namely
LifeComponent.Java and DinosaurController.Java
from lines 14-63 and 29-31 respectively
The first change consists of a basic code block which checks the life variable and accordingly shows/deletes the hearts.
The edit in the second file was done so that the hearts can update even after the player is lost; Because otherwise we can still see one heart lingering around from the end menu. The code makes the game to update the score even after being lost and hence there are 0 hearts after being lost.
🔗 Issue link