32 lines
866 B
Plaintext
32 lines
866 B
Plaintext
|
|
require("LuaUtil")
|
|
require("TextUtil")
|
|
|
|
SoulAllPower = {}
|
|
|
|
local _combatText
|
|
function SoulAllPower.Awake( ... )
|
|
_combatText = combatText:GetComponent("UIImgText")
|
|
_combatText.text = '0'
|
|
end
|
|
|
|
function SoulAllPower.Update()
|
|
local combineValue = 0
|
|
local soulAttrs = CS.GCGame.Table.TableManager.GetSoulGeneralAttr().Values
|
|
for k,v in pairs(soulAttrs) do
|
|
local soulID = v.Id
|
|
soulID = soulID * 1000
|
|
|
|
local kungfuData = CS.MeridiaSoulData.Instance:GetKungfuData(v.Id, v.HeavenID)
|
|
if kungfuData ~= nil then
|
|
soulID = soulID + kungfuData.star
|
|
end
|
|
|
|
local soulInfo = CS.GCGame.Table.TableManager.GetSoulGeneralStarByID(soulID, 0)
|
|
if soulInfo ~= nil then
|
|
combineValue = combineValue + soulInfo.AttrPower
|
|
_combatText.text = combineValue
|
|
end
|
|
end
|
|
end
|