diff options
-rw-r--r-- | assets/music/rill.ogg | bin | 0 -> 2755347 bytes | |||
-rw-r--r-- | assets/music/sorona.ogg | bin | 0 -> 3242397 bytes | |||
-rw-r--r-- | maps/default.lua | 1 | ||||
-rw-r--r-- | maps/ribbit.lua | 1 | ||||
-rw-r--r-- | maps/rill.lua | 7 | ||||
-rw-r--r-- | world.lua | 9 |
6 files changed, 14 insertions, 4 deletions
diff --git a/assets/music/rill.ogg b/assets/music/rill.ogg Binary files differnew file mode 100644 index 0000000..b36a2dd --- /dev/null +++ b/assets/music/rill.ogg diff --git a/assets/music/sorona.ogg b/assets/music/sorona.ogg Binary files differnew file mode 100644 index 0000000..5b2bb2f --- /dev/null +++ b/assets/music/sorona.ogg diff --git a/maps/default.lua b/maps/default.lua index fe7db97..7f4df7a 100644 --- a/maps/default.lua +++ b/maps/default.lua @@ -2,6 +2,7 @@ return { -- GENERAL name = "default", + theme = "sorona.ogg", center_x = 0, center_y = 0, width = 360, diff --git a/maps/ribbit.lua b/maps/ribbit.lua index 3480845..f6908e7 100644 --- a/maps/ribbit.lua +++ b/maps/ribbit.lua @@ -1,6 +1,7 @@ return { -- GENERAL name = "ribbit", + theme = "sorona.ogg", center_x = 0, center_y = 50, width = 360, diff --git a/maps/rill.lua b/maps/rill.lua index 4d2698a..59c34ca 100644 --- a/maps/rill.lua +++ b/maps/rill.lua @@ -1,10 +1,11 @@ return { -- CENTER AND SIZE name = "rill", + theme = "rill.ogg", center_x = 0, - center_y = 80, - width = 320, - height = 240, + center_y = 65, + width = 400, + height = 260, -- RESPAWN POINTS respawns = { {x = -135, y = 10}, @@ -30,7 +30,9 @@ World = { -- Gameplay status lastNaut = false, -- "WINNER" - win_move = 0 + win_move = 0, + -- Music + music = nil } -- Constructor of `World` ZA WARUDO! @@ -65,6 +67,8 @@ function World:new(map, ...) o:spawnNauts(...) -- Create camera o.camera = Camera:new(o) + -- Play music + o.music = Music:new(o.map.theme) return o end @@ -77,6 +81,7 @@ function World:delete() for _,naut in pairs(self.Nauts) do naut:delete() end + self.music:delete() self = nil end @@ -322,6 +327,7 @@ function World:draw() if debug then local c = self.camera local w, h = love.graphics.getWidth(), love.graphics.getHeight() + -- draw map center love.graphics.setColor(130,130,130) love.graphics.setLineWidth(1) love.graphics.setLineStyle("rough") @@ -332,6 +338,7 @@ function World:draw() local x1, y1 = c:translatePosition(cx, self.map.center_y) local x2, y2 = c:translatePosition(cx+w, self.map.center_y) love.graphics.line(x1,y1,x2,y2) + -- draw ox, oy love.graphics.setColor(200,200,200) love.graphics.setLineStyle("rough") local cx, cy = c:getPositionScaled() |