using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class RoomInfoPanel : MonoBehaviour { public Image SelectSceneImage; public Text SceneName; public Text IntroduceText; public Text Creater; public Text ScenceType; public Text RoomNum; // Use this for initialization void Start() { //:ToDo //房间缩略图 Texture2D tex= Resources.Load("Common/DongYouLiQing"); SelectSceneImage.sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.one * 0.5f); SetRoomInfo(); } public void SetRoomInfo() { SceneName.text = CurrentUserInfo.room.Map.name; IntroduceText.text = CurrentUserInfo.room.Map.introduction; Creater.text = CurrentUserInfo.room.Owner.UserInfo.Username; ScenceType.text = CurrentUserInfo.room.Map.sceneType.ToString(); if (ScenceType.text== "堆场_仓库_厂房") { ScenceType.text = "堆场,仓库,厂房"; } RoomNum.text = CurrentUserInfo.room.UserList.Count.ToString() + "/" + CurrentUserInfo.room.MaxPersons; } }