28 lines
689 B
C#
28 lines
689 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using NaughtyAttributes;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Valheim
|
|
{
|
|
public class IPBtn : MonoBehaviour
|
|
{
|
|
public Text IPText;
|
|
private ServerResponse _Info;
|
|
|
|
public void Init(int RoomId, ServerResponse info)
|
|
{
|
|
_Info = info;
|
|
IPText.text = "房间" + RoomId + " " + GameManager.ConvertTimestampToDateTime(info.createTime);
|
|
}
|
|
|
|
public void OnTouchBtn()
|
|
{
|
|
WorldUIManager.Ins.BackTo(null);
|
|
MRNetworkManager.Ins.JoinRoom(_Info.EndPoint.Address.ToString(), _Info.createTime);
|
|
}
|
|
}
|
|
}
|