-
Notifications
You must be signed in to change notification settings - Fork 0
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
@zamojtel/rpg 116 equipment #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
@@ -48,6 +51,19 @@ public void openTextImagePopup(String text, Image image, int x, int y){ | |||
public void openPointsPopup(int pointsCount, int x, int y) { | |||
openTextImagePopup("You earned " + pointsCount + " points!", coinImage, x, y); | |||
} | |||
public void openInventoryPopup(Inventory inventory,int x, int y){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void openInventoryPopup(Inventory inventory,int x, int y){ | |
public void openInventoryPopup(Inventory inventory,int x, int y){ |
if (object instanceof CollectibleGameObject) { | ||
popupController.openTextImagePopup("Picked up an item!", objectView.getImage(), getWindowCenterX(), getWindowCenterY()); | ||
objectView.setVisible(false); | ||
currentModel.getPlayer().getInventory().add((CollectibleGameObject) object); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace that with an Action implementation
Collected collectibles are now displayed if we click on a non-collectible item
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
7bedeb0
to
f4f1a23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, but it is still in development stage. Do not merge it to master yet.
Description
Checklist