New steps
This commit is contained in:
parent
105c95fc9d
commit
3c0dd6f667
13
steps/1_hello/main.lua
Normal file
13
steps/1_hello/main.lua
Normal file
@ -0,0 +1,13 @@
|
||||
function love.load()
|
||||
love.window.setMode(800, 480)
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
love.graphics.print('Hola a todos!!', 400 , 200)
|
||||
end
|
||||
|
||||
function love.keypressed(key, scancode, isrepeat)
|
||||
if key == 'escape' then
|
||||
love.event.push('quit')
|
||||
end
|
||||
end
|
19
steps/2_layout/main.lua
Normal file
19
steps/2_layout/main.lua
Normal file
@ -0,0 +1,19 @@
|
||||
function love.load()
|
||||
game = {}
|
||||
game.width = 800
|
||||
game.height = 480
|
||||
love.window.setMode(game.width, game.height)
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
end
|
||||
|
||||
-- Controls
|
||||
function love.keypressed(key, scancode, isrepeat)
|
||||
if key == 'escape' then
|
||||
love.event.push('quit')
|
||||
end
|
||||
end
|
BIN
steps/3_background/assets/sprites/background.jpg
Normal file
BIN
steps/3_background/assets/sprites/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
26
steps/3_background/main.lua
Normal file
26
steps/3_background/main.lua
Normal file
@ -0,0 +1,26 @@
|
||||
function love.load()
|
||||
game = {}
|
||||
game.width = 800
|
||||
game.height = 480
|
||||
love.window.setMode(game.width, game.height)
|
||||
-- Background
|
||||
background = {}
|
||||
background.img = love.graphics.newImage('assets/sprites/background.jpg')
|
||||
background.x = 0
|
||||
background.y = 0
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
-- Background
|
||||
love.graphics.draw(background.img, background.x, background.y)
|
||||
end
|
||||
|
||||
-- Controls
|
||||
function love.keypressed(key, scancode, isrepeat)
|
||||
if key == 'escape' then
|
||||
love.event.push('quit')
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user