131 lines
2.3 KiB
Lua
131 lines
2.3 KiB
Lua
local phaseBase = require_ex('Phase/Core/PhaseBase')
|
|
local PHASE_ID = PhaseId.DramaticPerformanceBag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag = HL.Class('PhaseDramaticPerformanceBag', phaseBase.PhaseBase)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag.s_messages = HL.StaticField(HL.Table) << {
|
|
|
|
}
|
|
|
|
|
|
PhaseDramaticPerformanceBag.m_renderTexture = HL.Field(HL.Userdata)
|
|
|
|
|
|
PhaseDramaticPerformanceBag.m_bagPanelItem = HL.Field(HL.Forward("PhasePanelItem"))
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._OnInit = HL.Override() << function(self)
|
|
PhaseDramaticPerformanceBag.Super._OnInit(self)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag.PrepareTransition = HL.Override(HL.Number, HL.Boolean, HL.Opt(HL.Number)) << function(self, transitionType, fastMode, anotherPhaseId)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._DoPhaseTransitionIn = HL.Override(HL.Boolean, HL.Opt(HL.Table)) << function(self, fastMode, args)
|
|
|
|
|
|
coroutine.waitCondition(function()
|
|
return true
|
|
end, coroutine.TailTick)
|
|
|
|
self.m_renderTexture = ScreenCaptureUtils.GetScreenCapture(math.floor(Screen.width), math.floor(Screen.height))
|
|
coroutine.waitForRenderDone()
|
|
|
|
self.m_bagPanelItem = self:CreatePhasePanelItem(PanelId.DramaticPerformanceBag, self.arg)
|
|
self.m_bagPanelItem.uiCtrl:SetScreenCaptureImg(self.m_renderTexture)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._DoPhaseTransitionOut = HL.Override(HL.Boolean, HL.Opt(HL.Table)) << function(self, fastMode, args)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._DoPhaseTransitionBehind = HL.Override(HL.Boolean, HL.Opt(HL.Table)) << function(self, fastMode, args)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._DoPhaseTransitionBackToTop = HL.Override(HL.Boolean, HL.Opt(HL.Table)) << function(self, fastMode, args)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._OnActivated = HL.Override() << function(self)
|
|
end
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._OnDeActivated = HL.Override() << function(self)
|
|
end
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._OnDestroy = HL.Override() << function(self)
|
|
self:_ReleaseRT()
|
|
PhaseDramaticPerformanceBag.Super._OnDestroy(self)
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PhaseDramaticPerformanceBag._ReleaseRT = HL.Method() << function(self)
|
|
if self.m_renderTexture then
|
|
self.m_bagPanelItem.uiCtrl:SetScreenCaptureImg(nil)
|
|
RTManager.ReleaseRenderTexture(self.m_renderTexture)
|
|
self.m_renderTexture = nil
|
|
end
|
|
end
|
|
|
|
|
|
|
|
HL.Commit(PhaseDramaticPerformanceBag)
|
|
|