local DungeonRuneRoundTipUI = class("DungeonRuneRoundTipUI", BaseUI)

function DungeonRuneRoundTipUI:ctor(params)
    self.round = params.round
end

function DungeonRuneRoundTipUI:isFullScreen()
    return false
end

function DungeonRuneRoundTipUI:getPrefabPath()
    return "assets/prefabs/ui/dungeon_rune/dungeon_rune_round_tip_ui.prefab"
end

function DungeonRuneRoundTipUI:onClose()
    if self.aniSequence then
        self.aniSequence:Kill()
        self.aniSequence = nil
    end
end

function DungeonRuneRoundTipUI:onLoadRootComplete()
    self:_display()
end

function DungeonRuneRoundTipUI:_display()
    local uiMap = self.root:genAllChildren()
    uiMap["dungeon_rune_round_tip_ui.desc_node.desc"]:setText(self.round)

    local node = uiMap["dungeon_rune_round_tip_ui.desc_node"]
    self.aniSequence = self.root:createBindTweenSequence()
    self.aniSequence:AppendCallback(function()
        node:setVisible(false)
    end)
    self.aniSequence:Append(node:getTransform():DOScale(1, 0.2))
    self.aniSequence:AppendInterval(0.3)
    self.aniSequence:Append(node:getTransform():DOScale(0, 0.5))
    self.aniSequence:AppendCallback(function()
        self:closeUI()
    end)
end

return DungeonRuneRoundTipUI