28 lines
759 B
Plaintext
28 lines
759 B
Plaintext
|
|
require("LuaUtil")
|
|
PetGroupQulityBugFix = {}
|
|
|
|
|
|
--生命周期
|
|
function PetGroupQulityBugFix:Awake( )
|
|
|
|
end
|
|
|
|
function PetGroupQulityBugFix:OnEnable( )
|
|
|
|
end
|
|
|
|
function PetGroupQulityBugFix:Update()
|
|
|
|
local qulityImgName = qulitImage:GetComponent("Image").sprite.name;
|
|
local petInfo = CS.GameManager.gameManager.PlayerDataPool.FellowContainer:GetFellowByGuid(CS.PetMainWnd.CurrentSelectFellowId);
|
|
if(petInfo == null ) then
|
|
return
|
|
end
|
|
local targetQuality = petInfo.Quality + 1;
|
|
local qulityName = CS.GCGame.Utils.GetFellowQuilityIcon(targetQuality);
|
|
|
|
CS.LoadAssetBundle.Instance:SetImageSprite(qulitImage:GetComponent("Image"), qulityName);
|
|
CS.LoadAssetBundle.Instance:SetImageSprite(iconImage:GetComponent("Image"), petInfo:GetIcon());
|
|
|
|
end |