powerfun-unity/Assets/Scripts/UI/Prefab/Panel/GameRoomListController.cs

41 lines
961 B
C#
Raw Normal View History

2022-04-22 18:24:56 +08:00

using Assets.Scripts;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class GameRoomListController : PFUIPanel
{
private RawImage Avatar;
private GameObject CreateRoomBtn;
private GameObject MapList;
protected override void Awake()
{
base.Awake();
}
protected override void Start()
{
base.Start();
Avatar = transform.Find("Avatar").GetComponent<RawImage>();
CreateRoomBtn = transform.Find("SwitchMode/GoList").gameObject;
MapList = transform.Find("MapList").gameObject;
Utils.DisplayImage(Avatar, App.CurrentUser.WxHeadImg);
UIManager.AddEvent(CreateRoomBtn, UnityEngine.EventSystems.EventTriggerType.PointerClick, CreateGameRoom);
}
private void Update()
{
}
//创建房间
private void CreateGameRoom(BaseEventData data)
{
MapList.SetActive(true);
}
}