You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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<Texture2D>("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();
|
|
|
|
RoomNum.text = CurrentUserInfo.room.UserList.Count.ToString() + "/" + CurrentUserInfo.room.MaxPersons;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|