Initial version - 1.2.0.60
EN: 1.2.0.60 CN: 1.2.0.61 JP: 1.2.0.63 KR: 1.2.0.67
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
local CookieLevelGridCtrl = class("CookieLevelGridCtrl", BaseCtrl)
|
||||
CookieLevelGridCtrl._mapNodeConfig = {
|
||||
imgLock = {},
|
||||
iconLock = {},
|
||||
imgIcon = {sComponentName = "Image"},
|
||||
txtLevelNumber = {sComponentName = "TMP_Text"},
|
||||
imgCmp = {},
|
||||
imgChoose = {},
|
||||
btnGrid = {sComponentName = "UIButton"}
|
||||
}
|
||||
function CookieLevelGridCtrl:Init(mapData, levelData, bTimeUnlock, bPreLevelUnlock, nIndex)
|
||||
self:SetPngSprite(self._mapNode.imgIcon, AllEnum.CookieModeIcon[mapData.PackModel] or AllEnum.CookieModeIcon[1])
|
||||
NovaAPI.SetTMPText(self._mapNode.txtLevelNumber, nIndex)
|
||||
self._mapNode.imgChoose:SetActive(false)
|
||||
self._mapNode.imgLock:SetActive(not bTimeUnlock)
|
||||
self._mapNode.iconLock:SetActive(not bPreLevelUnlock or not bTimeUnlock)
|
||||
self._mapNode.imgCmp:SetActive(levelData.bFirstComplete == true)
|
||||
end
|
||||
function CookieLevelGridCtrl:SetSelect(bActive)
|
||||
self._mapNode.imgChoose:SetActive(bActive)
|
||||
end
|
||||
return CookieLevelGridCtrl
|
||||
Reference in New Issue
Block a user