diff options
author | Indrajith K L | 2021-08-02 17:10:03 +0530 |
---|---|---|
committer | Indrajith K L | 2021-08-02 17:10:03 +0530 |
commit | f2e4f563661e5203f0531e37110d060b20b2f04c (patch) | |
tree | 5d393d164896b9272dbfd85ec9cbbf24ef9c9769 /levels/menu.wren | |
parent | 7d988900e2f73992fea504419d61d4cdf759fedf (diff) | |
download | rebirth-wren-f2e4f563661e5203f0531e37110d060b20b2f04c.tar.gz rebirth-wren-f2e4f563661e5203f0531e37110d060b20b2f04c.tar.bz2 rebirth-wren-f2e4f563661e5203f0531e37110d060b20b2f04c.zip |
* Adds Music Management
* Code Refactoring
* Adds Fonts
Diffstat (limited to 'levels/menu.wren')
-rw-r--r-- | levels/menu.wren | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/levels/menu.wren b/levels/menu.wren new file mode 100644 index 0000000..dcc24e9 --- /dev/null +++ b/levels/menu.wren @@ -0,0 +1,25 @@ +import "graphics" for Canvas, Color +import "./controls" for Controls +import "config" for Config +import "levels/level1" for Level1 +import "audio" for AudioEngine +import "font" for Font + +class Menu { + construct new(gameState) { + __gameState = gameState + var channel = AudioEngine.play("menu_music") + channel.volume = 0.5 + Canvas.font = "font_medium" + } + + update() { + if(Controls.isKeyDown(Config.KeyboardConstants["SELECT"])) { + __gameState.switch(Level1) + } + } + + draw(dt) { + Canvas.print("REBIRTH",Config.W/2 - 40,Config.H/2 - 20, Color.white) + } +}
\ No newline at end of file |