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,19 @@
|
||||
local TemplateAffinityLevelCtrl = class("TemplateAffinityLevelCtrl", BaseCtrl)
|
||||
TemplateAffinityLevelCtrl._mapNodeConfig = {
|
||||
imgHeart = {sComponentName = "Image"},
|
||||
txtLevel = {sComponentName = "TMP_Text"}
|
||||
}
|
||||
TemplateAffinityLevelCtrl._mapEventConfig = {}
|
||||
function TemplateAffinityLevelCtrl:SetInfo(nLevel, NpcId)
|
||||
local mapNpc = ConfigTable.GetData("StarTowerNPC", NpcId)
|
||||
if mapNpc ~= nil then
|
||||
local nGroupId = mapNpc.AffinityGroupId
|
||||
local nId = nGroupId * 100 + nLevel
|
||||
local mapAffinityCfgData = ConfigTable.GetData("NPCAffinityGroup", nId)
|
||||
if mapAffinityCfgData ~= nil then
|
||||
self:SetPngSprite(self._mapNode.imgHeart, mapAffinityCfgData.Icon)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtLevel, nLevel)
|
||||
end
|
||||
end
|
||||
end
|
||||
return TemplateAffinityLevelCtrl
|
||||
Reference in New Issue
Block a user