using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
public class TrialSweepAssistPlayerBehaviour : MonoBehaviour
|
{
|
[SerializeField] AvatarCell avatarCell;
|
[SerializeField] Image m_Sign;
|
[SerializeField] Text m_PlayerName;
|
[SerializeField] Text m_Social;
|
|
DungeonAssistModel model { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
|
|
public void Display(int playerId,int face,int facePic,int job, string playerName, int relation)
|
{
|
avatarCell.InitUI(AvatarHelper.GetOtherAvatarModel(face, facePic, job));
|
m_PlayerName.text = playerName;
|
var relationType = (DungeonAssistModel.RelatedToPlayer)relation;
|
m_Sign.SetActive(relationType != DungeonAssistModel.RelatedToPlayer.None);
|
switch (relationType)
|
{
|
case DungeonAssistModel.RelatedToPlayer.Friend:
|
m_Sign.SetSprite("XT_FBZZ_04");
|
break;
|
case DungeonAssistModel.RelatedToPlayer.Ally:
|
m_Sign.SetSprite("XT_FBZZ_05");
|
break;
|
}
|
var socialAddCoin = model.GetAssistReward(relation);
|
m_Social.SetActive(socialAddCoin > 0);
|
if (socialAddCoin > 0)
|
{
|
m_Social.text = Language.Get("TrialSweepSocialAddCoin", socialAddCoin);
|
}
|
}
|
}
|
}
|
|