June 2021
Beginner
344 pages
8h 9m
English
You can make the game a little more strategic by allowing the player to deliberately wait and receive some healing as a benefit. The player licks their wounds, possibly staunches some bleeding, and hit points are restored. Waiting while adjacent to a monster is a poor choice, usually resulting in a painful blow to the noggin. If the player wants to give it a try, that is their prerogative—dying is often the best way to learn to play a game.
Deliberate waiting and healing on inaction is handled entirely within the systems/player_input.rs system. Open the file and let’s tweak it a little.
Start by adding an Enemy and Health to the system:
| | #[system] |
| | #[read_component(Point)] ... |
Read now
Unlock full access