Develop #4

Merged
wariosolis merged 35 commits from develop into master 2017-01-04 00:04:34 +01:00
10 changed files with 40 additions and 10 deletions
Showing only changes of commit d4411e61c4 - Show all commits
+3
View File
@@ -24,6 +24,9 @@ function game.load()
game.music = love.audio.newSource("assets/audio/music/theme.mp3") game.music = love.audio.newSource("assets/audio/music/theme.mp3")
game:playMusic() game:playMusic()
game.stress = false
end end
function game:nextLevel() function game:nextLevel()
+3 -3
View File
@@ -6,11 +6,11 @@ local stage2 = {}
local image local image
function stage2.load(game, camera) 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) game:setNewSizeWorld(stage2.world.w, stage2.world.h)
image = love.graphics.newImage('assets/sprites/background/bg2.jpg')
arrows.load(game, stage2, camera) arrows.load(game, stage2, camera)
game.canvas.x = game.canvas.width / 2 game.canvas.x = game.window.width / 2
end end
function stage2.update(dt, game) function stage2.update(dt, game)
+24
View File
@@ -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

+7 -4
View File
@@ -3,14 +3,15 @@ local stages = require 'assets/scripts/stages'
local controls = require 'assets/scripts/controls' local controls = require 'assets/scripts/controls'
local bells = require 'assets/scripts/bells' local bells = require 'assets/scripts/bells'
local camera = require 'assets/scripts/camera' local camera = require 'assets/scripts/camera'
local stress = require 'assets/scripts/stress'
-- LOAD -- LOAD
function love.load() function love.load()
game.load() game.load()
camera.load(game) camera.load(game)
stages.load(game, camera) stages.load(game, camera)
bells.load(game, camera) stress.load(game, camera)
--bells.load(game, camera)
controls.load(game) controls.load(game)
end end
@@ -20,7 +21,8 @@ function love.update(dt)
game.world:update(dt) game.world:update(dt)
camera.update(game) camera.update(game)
stages.update(dt, game, camera) 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) controls.update(dt, game, camera)
end end
@@ -29,7 +31,8 @@ function love.draw()
camera.gcam:draw( camera.gcam:draw(
function(l,t,w,h) function(l,t,w,h)
stages.draw() stages.draw()
bells.draw(game) stress.draw()
-- bells.draw(game)
end end
) )
controls.draw() controls.draw()