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,17 @@
|
||||
local TemplateBattleAssetBarCtrl = class("TemplateBattleAssetBarCtrl", BaseCtrl)
|
||||
local LayoutRebuilder = CS.UnityEngine.UI.LayoutRebuilder
|
||||
TemplateBattleAssetBarCtrl._mapNodeConfig = {
|
||||
imgCoinIcon = {sComponentName = "Image"},
|
||||
txtCoinCount = {sComponentName = "TMP_Text"}
|
||||
}
|
||||
function TemplateBattleAssetBarCtrl:Awake()
|
||||
self.rtObj = self.gameObject:GetComponent("RectTransform")
|
||||
end
|
||||
function TemplateBattleAssetBarCtrl:RefreshBar(assetId, assetCount)
|
||||
self:SetSprite_Coin(self._mapNode.imgCoinIcon, assetId)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCoinCount, assetCount)
|
||||
if nil ~= self.rtObj then
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(self.rtObj)
|
||||
end
|
||||
end
|
||||
return TemplateBattleAssetBarCtrl
|
||||
Reference in New Issue
Block a user