PGRData/Script/matrix/xmovieactions/XMovieActionRoleMask.lua

19 lines
611 B
Lua
Raw Normal View History

2024-09-01 20:49:41 +00:00
local XMovieActionRoleMask = XClass(XMovieActionBase,"XMovieActionRoleMask")
function XMovieActionRoleMask:Ctor(actionData)
self.IsEnable = XDataCenter.MovieManager.ParamToNumber(actionData.Params[1]) == 1
end
function XMovieActionRoleMask:OnRunning()
if self.IsEnable then
self.UiRoot:PlayAnimation("UiMaskEnable",nil,function()
self.UiRoot.UiMask02.gameObject:SetActiveEx(true)
end)
else
self.UiRoot:PlayAnimation("UiMaskDisable",function()
self.UiRoot.UiMask02.gameObject:SetActiveEx(false )
end)
end
end
return XMovieActionRoleMask