corrected bug where sound stopped on top of fog. now sound just drone instantly.
This commit is contained in:
parent
d709e6f9e9
commit
ee630a2bb9
7
main.lua
7
main.lua
|
@ -30,9 +30,12 @@ function love.update(dt)
|
|||
local terrain = get_terrain(p_x,p_y)
|
||||
|
||||
--play drone corresponding to current space if not playing
|
||||
if terrain<5 then
|
||||
if terrain<5 and sound_switched == false then
|
||||
stop_old_drone(current_drone)
|
||||
choose_drone()
|
||||
sound_switched = true
|
||||
elseif terrain>=5 then
|
||||
sound_switched = false
|
||||
end
|
||||
play_drone(current_drone)
|
||||
|
||||
|
@ -168,7 +171,7 @@ end
|
|||
function draw_portal()
|
||||
local spriteNum = math.floor(player.currentTime / player.duration * 2) + building_base
|
||||
|
||||
love.graphics.draw(building_sprite[spriteNum], grid_x + ((portal_y-portal_x) * (block_width / 2)) + block_width/4, grid_y + ((portal_x+portal_y) * (block_depth / 2)) - (block_depth * (grid_size / 2)) - block_depth - block_height/8, 0, 1)
|
||||
love.graphics.draw(building_sprite[spriteNum], grid_x + ((portal_y-portal_x) * (block_width / 2)) + block_width/4, grid_y + ((portal_x+portal_y) * (block_depth / 2)) - (block_depth * (grid_size / 2)) - block_depth - block_height/4, 0, 1)
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue