Some new buttons


After reviewing the "Save/Load/Game" sample from https://docs.dragonruby.org/#/samples/save-load?id=save-load-game-mainrb I have revisited my button approach.   Buttons themselves are simpler now, basically just hashes, and all the functionality lives in the game class.

I've also tried splitting the actual game logic out from the engine logic by subclassing Game for the actual game and hiding all the boilerplate in the parent class.

The Produce! button generates Resource when clicked if it's full.

The Defend! button counts down to 0.  Clicking it resets the countdown. If it makes it to 0, that button is destroyed.

Files

button-experiments-windows-amd64.zip 3.9 MB
Version 0.1 5 days ago
button-experiments-html5.zip Play in browser
Version 0.1 5 days ago
button-experiments-linux-amd64.zip 4 MB
Version 0.1 5 days ago
button-experiments-macos.zip 5.3 MB
Version 0.1 5 days ago
button-experiments-linux-raspberrypi.zip 3.8 MB
Version 0.1 5 days ago

Get Button Experiments

Leave a comment

Log in with itch.io to leave a comment.