This commit is contained in:
2021-12-21 23:37:41 +01:00
parent 63bd4c6158
commit c282c31ff4
8 changed files with 30 additions and 10 deletions

View File

@@ -61,4 +61,10 @@ gSounds = {
['levelup'] = love.audio.newSource('sounds/levelup.wav', 'static'),
['victory-music'] = love.audio.newSource('sounds/victory.wav', 'static'),
['intro-music'] = love.audio.newSource('sounds/intro.mp3', 'static')
}
gImages = {
['img1'] = love.graphics.newImage('graphics/images/wp_18.jpg'),
['img2'] = love.graphics.newImage('graphics/images/wp_30.jpg'),
['img3'] = love.graphics.newImage('graphics/images/wp_46.jpg'),
}

View File

@@ -15,6 +15,7 @@ function Level:update(dt)
end
function Level:render()
self:renderBackground()
self:renderOuterSegments()
end
@@ -24,6 +25,10 @@ function Level:renderOuterSegments()
end
end
function Level:renderBackground()
love.graphics.draw(gImages["img1"],LEVEL_RENDER_OFFSET,LEVEL_RENDER_OFFSET_TOP)
end
function Level:createLevel()
local level = {
[1] = Segment({LEVEL_RENDER_OFFSET,LEVEL_RENDER_OFFSET_TOP},{VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},.5,'down'),