Develop #4
@@ -24,6 +24,8 @@ function game.load()
|
||||
|
||||
game.music = love.audio.newSource("assets/audio/music/theme.mp3")
|
||||
game:playMusic()
|
||||
|
||||
game.stress = false
|
||||
end
|
||||
|
||||
function game:nextLevel()
|
||||
|
||||
@@ -6,11 +6,11 @@ local stage2 = {}
|
||||
local image
|
||||
|
||||
function stage2.load(game, camera)
|
||||
stage2.world = { w = 2280, h= 720}
|
||||
image = love.graphics.newImage('assets/sprites/background/santabiblia.jpg')
|
||||
stage2.world = { w = image:getWidth(), h= 720}
|
||||
game:setNewSizeWorld(stage2.world.w, stage2.world.h)
|
||||
image = love.graphics.newImage('assets/sprites/background/bg2.jpg')
|
||||
arrows.load(game, stage2, camera)
|
||||
game.canvas.x = game.canvas.width / 2
|
||||
game.canvas.x = game.window.width / 2
|
||||
end
|
||||
|
||||
function stage2.update(dt, game)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
local anim8 = require 'assets/scripts/vendor/anim8'
|
||||
local tools = require 'assets/scripts/tools'
|
||||
local arrows = require 'assets/scripts/arrows'
|
||||
|
||||
local stress = {}
|
||||
local image
|
||||
|
||||
function stress.load(game, camera)
|
||||
image = love.graphics.newImage('assets/sprites/stress/stress.png')
|
||||
end
|
||||
|
||||
function stress.update(dt, game)
|
||||
stress.stress = game.stress
|
||||
arrows.update(dt)
|
||||
end
|
||||
|
||||
function stress.draw()
|
||||
if stress.stress == true then
|
||||
cam_x, cam_y = camera.gcam:getVisible()
|
||||
love.graphics.draw(image, cam_x, cam_y)
|
||||
end
|
||||
end
|
||||
|
||||
return stress
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@@ -3,14 +3,15 @@ local stages = require 'assets/scripts/stages'
|
||||
local controls = require 'assets/scripts/controls'
|
||||
local bells = require 'assets/scripts/bells'
|
||||
local camera = require 'assets/scripts/camera'
|
||||
|
||||
local stress = require 'assets/scripts/stress'
|
||||
|
||||
-- LOAD
|
||||
function love.load()
|
||||
game.load()
|
||||
camera.load(game)
|
||||
stages.load(game, camera)
|
||||
bells.load(game, camera)
|
||||
stress.load(game, camera)
|
||||
--bells.load(game, camera)
|
||||
controls.load(game)
|
||||
end
|
||||
|
||||
@@ -20,7 +21,8 @@ function love.update(dt)
|
||||
game.world:update(dt)
|
||||
camera.update(game)
|
||||
stages.update(dt, game, camera)
|
||||
bells.update(dt, game, camera)
|
||||
stress.update(dt, game, camera)
|
||||
-- bells.update(dt, game, camera)
|
||||
controls.update(dt, game, camera)
|
||||
end
|
||||
|
||||
@@ -29,7 +31,8 @@ function love.draw()
|
||||
camera.gcam:draw(
|
||||
function(l,t,w,h)
|
||||
stages.draw()
|
||||
bells.draw(game)
|
||||
stress.draw()
|
||||
-- bells.draw(game)
|
||||
end
|
||||
)
|
||||
controls.draw()
|
||||
|
||||
Reference in New Issue
Block a user