TaggedEngine/charts/guns/script.lua
AGU 8652c3f625 Tankman Stage Progress + more cutscenes
uploading what i have cus im probably not getting anything else done tonight
2025-06-09 12:33:21 -04:00

48 lines
1019 B
Lua

local videoPath = "videos/gunsCutscene.ogv"
local song
local videoStream
local video
local module = {}
function module.onCreate(songName)
if songName == "Guns" then
module.shared.canStart = false
song = songName
videoStream = love.video.newVideoStream(love.filesystem.newFile(videoPath))
videoStream:play()
video = love.graphics.newVideo(videoStream)
video:play()
end
end
function module.onUpdate()
if videoStream then
if not videoStream:isPlaying() then
module.shared.canStart = true
video = nil
videoStream = nil
end
end
end
function module.onDraw()
if video then
love.graphics.draw(video, 0,0,0,1.5,1.5)
end
end
function module.onClose()
if video then
video:stop()
video:release()
video = nil
videoStream:stop()
videoStream:release()
videoStream = nil
end
end
return module