forked from sin365/AxibugEmuOnline
Compare commits
No commits in common. "7b85fd8ce8f4c7d970c889aa27f55284afbacf60" and "12716c77c86547324b67e449cd32799abaeb6aa8" have entirely different histories.
7b85fd8ce8
...
12716c77c8
@ -23,6 +23,27 @@ namespace AxibugEmuOnline.Client
|
|||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
public int roomID { get; private set; }
|
public int roomID { get; private set; }
|
||||||
|
|
||||||
|
protected override void Awake()
|
||||||
|
{
|
||||||
|
base.Awake();
|
||||||
|
|
||||||
|
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListSingleUpdate, OnRoomSingleUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDestroy()
|
||||||
|
{
|
||||||
|
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListSingleUpdate, OnRoomSingleUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnRoomSingleUpdate(int roomId)
|
||||||
|
{
|
||||||
|
if (roomId != roomID) return;
|
||||||
|
|
||||||
|
if (App.roomMgr.GetRoomListMiniInfo(roomId, out var roomInfo))
|
||||||
|
{
|
||||||
|
UpdateUI(roomInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SetData(object data)
|
public void SetData(object data)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,7 +12,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll);
|
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll);
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListSingleClose, OnRoomClosed);
|
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListSingleClose, OnRoomClosed);
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListSingleUpdate, OnRoomSingleUpdate);
|
|
||||||
base.Awake();
|
base.Awake();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +19,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
protected override void OnDestroy()
|
protected override void OnDestroy()
|
||||||
{
|
{
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll);
|
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll);
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListSingleUpdate, OnRoomSingleUpdate);
|
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListSingleClose, OnRoomClosed);
|
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListSingleClose, OnRoomClosed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,14 +36,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRoomSingleUpdate(int obj)
|
|
||||||
{
|
|
||||||
if (m_entering)
|
|
||||||
{
|
|
||||||
RefreshUI();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnRoomListUpdateAll(int obj)
|
private void OnRoomListUpdateAll(int obj)
|
||||||
{
|
{
|
||||||
if (m_entering)
|
if (m_entering)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user