-
Notifications
You must be signed in to change notification settings - Fork 0
@co012/rpg 108 teleport action #31
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
Conversation
mhawryluk
left a comment
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.
Well done! 🥇
| { "tag": "object-1", "position": { "row": 1, "col": 8 }, "type": "collectible", "assetPath": "assets/diamond.png" }, | ||
| { "tag": "object-2", "position": { "row": 6, "col": 3 }, "type": "collectible", "assetPath": "assets/key.png" }, | ||
| { "tag": "object-3", "position": { "row": 1, "col": 1 }, "type": "dialog", "assetPath": "assets/zombie.png" }, | ||
| { "tag": "object-4", "position": { "row": 3, "col": 2 }, "type": "dialog", "assetPath": "assets/zombie.png" }, | ||
| { "tag": "object-5", "position": { "row": 8, "col": 8 }, "type": "dialog", "assetPath": "assets/chest.png" } | ||
| ], |
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.
some objects don't fit on the map. map size is currently dependent on the asset dimensions, it should probably be specified in config instead, but that's a problem for another task ;)
| LocationView nextView = this.tagToLocationViewMap.get(action.destinationLocationTag); | ||
| LocationModel nextModel = this.tagToLocationModelMap.get(action.destinationLocationTag); | ||
|
|
||
| playerController.teleportTo(nextModel, nextView, action.playerPosition); |
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.
we could also check here if the location is unlocked, for example whether the player has enough points or a specific item in his equipment
Description
Checklist