bg work
This commit is contained in:
25
.vscode/launch.json
vendored
25
.vscode/launch.json
vendored
@@ -1,14 +1,19 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"type": "lua",
|
"name": "Debug Love",
|
||||||
"request": "launch",
|
"type": "lua-local",
|
||||||
"name": "Debug",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/main.lua"
|
"program": {
|
||||||
}
|
"command": "love"
|
||||||
|
},
|
||||||
|
"args": [
|
||||||
|
"."
|
||||||
|
],
|
||||||
|
"scriptRoots": [
|
||||||
|
"game"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
BIN
graphics/images/wp_18.jpg
Normal file
BIN
graphics/images/wp_18.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
graphics/images/wp_3.jpg
Normal file
BIN
graphics/images/wp_3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
BIN
graphics/images/wp_30.jpg
Normal file
BIN
graphics/images/wp_30.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 KiB |
BIN
graphics/images/wp_46.jpg
Normal file
BIN
graphics/images/wp_46.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 428 KiB |
4
main.lua
4
main.lua
@@ -31,6 +31,10 @@
|
|||||||
|
|
||||||
require 'src/Dependencies'
|
require 'src/Dependencies'
|
||||||
|
|
||||||
|
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
|
||||||
|
require("lldebugger").start()
|
||||||
|
end
|
||||||
|
|
||||||
function love.load()
|
function love.load()
|
||||||
love.window.setTitle('SpiderCut')
|
love.window.setTitle('SpiderCut')
|
||||||
love.graphics.setDefaultFilter('nearest', 'nearest')
|
love.graphics.setDefaultFilter('nearest', 'nearest')
|
||||||
|
|||||||
@@ -61,4 +61,10 @@ gSounds = {
|
|||||||
['levelup'] = love.audio.newSource('sounds/levelup.wav', 'static'),
|
['levelup'] = love.audio.newSource('sounds/levelup.wav', 'static'),
|
||||||
['victory-music'] = love.audio.newSource('sounds/victory.wav', 'static'),
|
['victory-music'] = love.audio.newSource('sounds/victory.wav', 'static'),
|
||||||
['intro-music'] = love.audio.newSource('sounds/intro.mp3', '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'),
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ function Level:update(dt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Level:render()
|
function Level:render()
|
||||||
|
self:renderBackground()
|
||||||
self:renderOuterSegments()
|
self:renderOuterSegments()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -24,6 +25,10 @@ function Level:renderOuterSegments()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Level:renderBackground()
|
||||||
|
love.graphics.draw(gImages["img1"],LEVEL_RENDER_OFFSET,LEVEL_RENDER_OFFSET_TOP)
|
||||||
|
end
|
||||||
|
|
||||||
function Level:createLevel()
|
function Level:createLevel()
|
||||||
local level = {
|
local level = {
|
||||||
[1] = Segment({LEVEL_RENDER_OFFSET,LEVEL_RENDER_OFFSET_TOP},{VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},.5,'down'),
|
[1] = Segment({LEVEL_RENDER_OFFSET,LEVEL_RENDER_OFFSET_TOP},{VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},.5,'down'),
|
||||||
|
|||||||
Reference in New Issue
Block a user