More sfx, misc tweaks
This commit is contained in:
parent
efb8a53f4c
commit
ed5e2484fd
BIN
art/bg/help.png
BIN
art/bg/help.png
Binary file not shown.
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1 @@
|
||||||
|
Literally just a gradient. lol
|
BIN
art/bg/sky.png
BIN
art/bg/sky.png
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 24 KiB |
Binary file not shown.
Binary file not shown.
17
main.lua
17
main.lua
|
@ -27,6 +27,8 @@ function love.load ()
|
||||||
bgm = nil
|
bgm = nil
|
||||||
flapSfx = love.audio.newSource( "art/sfx/flap.wav", "static")
|
flapSfx = love.audio.newSource( "art/sfx/flap.wav", "static")
|
||||||
cpuFlapSfx = love.audio.newSource( "art/sfx/cpuflap.wav", "static")
|
cpuFlapSfx = love.audio.newSource( "art/sfx/cpuflap.wav", "static")
|
||||||
|
dashSfx = love.audio.newSource( "art/sfx/dash.wav", "static")
|
||||||
|
cpuDashSfx = love.audio.newSource( "art/sfx/cpudash.wav", "static")
|
||||||
bounceSfx = love.audio.newSource( "art/sfx/bounce.wav", "static")
|
bounceSfx = love.audio.newSource( "art/sfx/bounce.wav", "static")
|
||||||
waveSfx = love.audio.newSource( "art/sfx/wave.wav", "static")
|
waveSfx = love.audio.newSource( "art/sfx/wave.wav", "static")
|
||||||
|
|
||||||
|
@ -64,7 +66,6 @@ function love.draw ()
|
||||||
end
|
end
|
||||||
love.graphics.draw(bg, 0, 0)
|
love.graphics.draw(bg, 0, 0)
|
||||||
love.graphics.draw(bg, 512, 0)
|
love.graphics.draw(bg, 512, 0)
|
||||||
love.graphics.draw(bg, 1024, 0)
|
|
||||||
|
|
||||||
love.graphics.draw(waveText, 200, 340, 0, 2, 2)
|
love.graphics.draw(waveText, 200, 340, 0, 2, 2)
|
||||||
love.graphics.draw(lifeText, 125, 355, 0, 1.3, 1.3)
|
love.graphics.draw(lifeText, 125, 355, 0, 1.3, 1.3)
|
||||||
|
@ -318,7 +319,7 @@ end
|
||||||
--------------------
|
--------------------
|
||||||
function game_load ()
|
function game_load ()
|
||||||
mode = game
|
mode = game
|
||||||
lives = 4
|
lives = 6
|
||||||
wave = 0
|
wave = 0
|
||||||
waveText:set( "Wave " .. wave )
|
waveText:set( "Wave " .. wave )
|
||||||
lifeText:set( "Lives " .. lives )
|
lifeText:set( "Lives " .. lives )
|
||||||
|
@ -622,6 +623,14 @@ function Flier:dash ()
|
||||||
elseif ( isLeft(self.pointing) ) then
|
elseif ( isLeft(self.pointing) ) then
|
||||||
self.x_vel = max_vel * -2
|
self.x_vel = max_vel * -2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ( self.species ) then
|
||||||
|
cpuDashSfx:stop()
|
||||||
|
cpuDashSfx:play()
|
||||||
|
else
|
||||||
|
dashSfx:stop()
|
||||||
|
dashSfx:play()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- kill the Flier, show cool particles
|
-- kill the Flier, show cool particles
|
||||||
|
@ -943,14 +952,14 @@ end
|
||||||
-- assuming a and b are colliding, act accordingly
|
-- assuming a and b are colliding, act accordingly
|
||||||
-- aka, bounce-back or kill one
|
-- aka, bounce-back or kill one
|
||||||
function judgeCollision ( a, b )
|
function judgeCollision ( a, b )
|
||||||
if ( a.y < b.y - 9 and ( b.living ) and ( a.living or a.class() == "Bat" ) ) then
|
if ( a.y < b.y - 12 and ( b.living ) and ( a.living or a.class() == "Bat" ) ) then
|
||||||
if ( (maxSpeed( a.x_vel ) or a.dashTime > 0) and b.blocking == true ) then
|
if ( (maxSpeed( a.x_vel ) or a.dashTime > 0) and b.blocking == true ) then
|
||||||
a.x_vel = a.x_vel * -1
|
a.x_vel = a.x_vel * -1
|
||||||
b.x_vel = b.x_vel * -1
|
b.x_vel = b.x_vel * -1
|
||||||
else
|
else
|
||||||
b:kill( a )
|
b:kill( a )
|
||||||
end
|
end
|
||||||
elseif ( a.y > b.y + 9 and ( a.living ) and ( b.living or a.class() == "Bat" ) ) then
|
elseif ( a.y > b.y + 12 and ( a.living ) and ( b.living or a.class() == "Bat" ) ) then
|
||||||
if ( (maxSpeed( b.x_vel ) or b.dashTime > 0) and a.blocking == true ) then
|
if ( (maxSpeed( b.x_vel ) or b.dashTime > 0) and a.blocking == true ) then
|
||||||
a.x_vel = a.x_vel * -1
|
a.x_vel = a.x_vel * -1
|
||||||
b.x_vel = b.x_vel * -1
|
b.x_vel = b.x_vel * -1
|
||||||
|
|
Ŝarĝante…
Reference in New Issue