增加自定义不是房间的消息发送
This commit is contained in:
77
Assets/Script/MainPanel/MainPanel.cs
Normal file
77
Assets/Script/MainPanel/MainPanel.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using Stary.Evo.UIFarme;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Script
|
||||
{
|
||||
public class MainPanel : BasePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// 退出按钮
|
||||
/// </summary>
|
||||
private Button _arrowLeft;
|
||||
|
||||
/// <summary>
|
||||
/// 房间ID
|
||||
/// </summary>
|
||||
private Text _idText;
|
||||
|
||||
private MeetingContacts _meetingContacts;
|
||||
|
||||
/// <summary>
|
||||
/// 房间人数
|
||||
/// </summary>
|
||||
private Text _roomPeopleNumText;
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
private Text _timeText;
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
private Text _titleText;
|
||||
|
||||
public override UITweenType TweenType => UITweenType.Fade;
|
||||
|
||||
public override string UIPath => "Canvas";
|
||||
|
||||
public override void Initialize(GameObject panelGo)
|
||||
{
|
||||
base.Initialize(panelGo);
|
||||
_titleText = panelGo.transform.Find("Header/title").GetComponent<Text>();
|
||||
_timeText = panelGo.transform.Find("Header/time").GetComponent<Text>();
|
||||
_arrowLeft = panelGo.transform.Find("Header/arrow-left").GetComponent<Button>();
|
||||
_idText = panelGo.transform.Find("MeetingInfoCard/meeting/id").GetComponent<Text>();
|
||||
_roomPeopleNumText = panelGo.transform.Find("MeetingInfoCard/numberOfPeople/number").GetComponent<Text>();
|
||||
_meetingContacts = new MeetingContacts();
|
||||
_meetingContacts.Initialize(panelGo.transform.Find("MeetingContacts").gameObject);
|
||||
}
|
||||
|
||||
public override void OnEnter(Action complete = null)
|
||||
{
|
||||
base.OnEnter(complete);
|
||||
_meetingContacts.OnEnter();
|
||||
_arrowLeft.onClick.AddListener(OnArrowLeftClick);
|
||||
}
|
||||
|
||||
|
||||
public override void OnExit(float delay = 0)
|
||||
{
|
||||
base.OnExit(delay);
|
||||
_meetingContacts.OnExit();
|
||||
_arrowLeft.onClick.RemoveListener(OnArrowLeftClick);
|
||||
}
|
||||
|
||||
private void OnArrowLeftClick()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user