PGRData/Resources/Scripts/XMovieActions/XMovieActionVideoPlay.lua
2022-12-26 14:06:01 +05:30

27 lines
No EOL
681 B
Lua

local XMovieActionVideoPlay = XClass(XMovieActionBase, "XMovieActionVideoPlay")
function XMovieActionVideoPlay:Ctor(actionData)
local params = actionData.Params
local paramToNumber = XDataCenter.MovieManager.ParamToNumber
self.VideoId = paramToNumber(params[1])
end
function XMovieActionVideoPlay:IsBlock()
return true
end
function XMovieActionVideoPlay:GetBeginDelay()
return 1000
end
function XMovieActionVideoPlay:OnRunning()
self.UiRoot:Hide()
XDataCenter.VideoManager.PlayMovie(self.VideoId, function()
self.UiRoot:Show()
XEventManager.DispatchEvent(XEventId.EVENT_MOVIE_BREAK_BLOCK)
end)
end
return XMovieActionVideoPlay