33 lines
713 B
Text
33 lines
713 B
Text
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Networking;
|
|
using UnityEngine.UI;
|
|
|
|
|
|
[NetworkSettings(channel = 0, sendInterval = 0)]
|
|
public class serverStartMenu : NetworkBehaviour
|
|
{
|
|
public TrafficController traffic;
|
|
public tweetPoller tweet;
|
|
public InputField trafficAddress;
|
|
public InputField eventAddress;
|
|
|
|
public GameObject next;
|
|
|
|
public NetworkManager network;
|
|
|
|
public void createServer ()
|
|
{
|
|
if(trafficAddress.text != "")
|
|
traffic.url = trafficAddress.text;
|
|
|
|
if (eventAddress.text != "")
|
|
tweet.url = eventAddress.text;
|
|
|
|
|
|
network.StartServer();
|
|
gameObject.SetActive(false);
|
|
next.SetActive(true);
|
|
}
|
|
}
|