aboutsummaryrefslogtreecommitdiff
path: root/levels
diff options
context:
space:
mode:
authorIndrajith K L2021-08-03 17:53:10 +0530
committerIndrajith K L2021-08-03 17:53:10 +0530
commit705886d371cf2cfa619b321c0d87caca0773a789 (patch)
tree0e860ca10c6cfd122b403b02e84d4fef72078b63 /levels
parent5bd12d5a658c1cd710bc950be971ebe3993ed11d (diff)
downloadrebirth-wren-705886d371cf2cfa619b321c0d87caca0773a789.tar.gz
rebirth-wren-705886d371cf2cfa619b321c0d87caca0773a789.tar.bz2
rebirth-wren-705886d371cf2cfa619b321c0d87caca0773a789.zip
Bug Fixes
Player Placement Basic Player Movement
Diffstat (limited to 'levels')
-rw-r--r--levels/level1.wren11
1 files changed, 9 insertions, 2 deletions
diff --git a/levels/level1.wren b/levels/level1.wren
index 83d626f..d113a25 100644
--- a/levels/level1.wren
+++ b/levels/level1.wren
@@ -1,17 +1,24 @@
import "./level_map" for LevelMap
import "audio" for AudioEngine
-class Level1 {
+import "./controls" for Controls
+import "./config" for Config
+class Level1 {
construct new(gameState) {
+ __gameState = gameState
_level1 = LevelMap.new("level1")
var channel = AudioEngine.play("level1_bg")
channel.volume = 0.2
}
update() {
+ if(Controls.justPressed(Config.KeyboardConstants["ATTACK"])) {
+ }
+ _level1.update()
}
draw(dt) {
- _level1.draw(0,0)
+ _level1.render(0,0)
+ _level1.draw(dt)
}
} \ No newline at end of file