Created
May 23, 2026 18:41
-
-
Save jennymaeleidig/3c5e4eba4db8ea7f82650db81a66fb36 to your computer and use it in GitHub Desktop.
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
| function scene:initValues() | |
| -- globals | |
| PlayerInst = BattlePlayer() | |
| EnemiesInst = BattleEnemies() | |
| TurnManagerInst = BattleTurnManager() | |
| StatusMessage = "" | |
| BattleMainHandler = { | |
| upButtonHold = function() | |
| PlayerInst:readySelEnemy() -- Before attacking, the player must select an enemy. | |
| end, | |
| rightButtonHold = function() | |
| PlayerInst:readyItem() | |
| end, | |
| downButtonHold = function() | |
| PlayerInst:readyFlee() | |
| end, | |
| leftButtonHold = function() | |
| PlayerInst:readyDefend() | |
| end, | |
| -- # TODO: remove, quick reset for testing | |
| BButtonHeld = function() | |
| StatusMessage = "reset" | |
| scene:initValues() | |
| end, | |
| -- # TODO: remove | |
| AButtonHeld = function() | |
| StatusMessage = "Switched Turn" | |
| TurnManagerInst:nextTurn() | |
| end | |
| } | |
| -- scene setup | |
| self.backgroundColor = Graphics.kColorWhite | |
| self.inputHandler = BattleMainHandler | |
| TurnManagerInst:nextTurn() | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment