//[SerializeField] //RawImage headTexture; //public ulong mPlayerId; public void InitData(ulong playerId, string name, EDissmissRoomResult result) { //mPlayerId = playerId; nameLab.text = name; // StartCoroutine(MsgContainer.GlobalData.GetHeadTextureByIdx(headTexture, RoomInfo.Instance.GetPlayerInfoById(playerId).head_portrait)); if (playerId != PlayerInfo.Instance.mPlayerPid) { StartCoroutine(GlobalData.GetHeadTextureByIdx(headTexture, RoomInfo.Instance.GetPlayerInfoById(playerId).head_portrait)); } else { headTexture.texture = DataManager.Instance.GetTextureByName(ETextureName.EHeadTex1); } UpdateData(result); }
public void UpdateData(EDissmissRoomResult result) { string resultName = ""; switch (result) { case EDissmissRoomResult.EAgree: resultName = "disbanded_agree"; break; case EDissmissRoomResult.EDisagree: resultName = "disbanded_refuse"; break; case EDissmissRoomResult.EUnSelect: resultName = "disbanded_unselected"; break; } resultImg.sprite = ResourceManager.Instance.GetSpriteByName((int)EAtlasType.EPlaying, resultName); resultImg.SetNativeSize(); }
public void UpdateItemData(ulong playerId, EDissmissRoomResult result) { curPlayerDic[playerId].UpdateData(result); }