local ZPZhanJiPlayer = class("ZPZhanJiPlayer") --[[ 单个的玩家信息,主要是玩家头像、昵称、输赢情况,称号等 --]] function ZPZhanJiPlayer:ctor(gameRule, uid, score) self.ui = loadUI("zp_base/res/ui/ui_zhanji/zipai_zhanji_player.ui") -- 总分 if score > 0 and score ~= nil then score = "+"..tostring(score) end self.ui.Items.Text_Score:setText(score) local playerInfo = app.playerInfoManager:getPlayerInfo(uid); if playerInfo then -- 名称 local name = string.getShortName(playerInfo.name, 4) self.ui.Items.Text_Name:setText(name or "") --[[-- 头像 local nodeHead = self.ui.Items.ImageView_head setPlayerHeadImage(uid, playerInfo.head, nodeHead);--]] end end return ZPZhanJiPlayer