30 lines
827 B
C#
30 lines
827 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using NeonTea.Quakeball.Net.Peers;
|
|
|
|
namespace NeonTea.Quakeball.Net {
|
|
public class CanvasInput : MonoBehaviour {
|
|
|
|
public Button Host;
|
|
public Button Join;
|
|
public InputField HostAddr;
|
|
public InputField Port;
|
|
|
|
void Start() {
|
|
Host.onClick.AddListener(() => {
|
|
//Destroy(Join.gameObject);
|
|
//Host.interactable = false;
|
|
Net.Singleton.Start(new Server(), "0.0.0.0", 8080);
|
|
});
|
|
Join.onClick.AddListener(() => {
|
|
//Destroy(Host.gameObject);
|
|
//Join.interactable = false;
|
|
Net.Singleton.Start(new Client(), "127.0.0.1", 8080);
|
|
});
|
|
}
|
|
|
|
|
|
}
|
|
} |