Initial
This commit is contained in:
commit
36a53f343e
1 changed files with 300431 additions and 0 deletions
33
UnityProject/Assets/Scripts/menu/serverRunningMenu.cs.meta
Normal file
33
UnityProject/Assets/Scripts/menu/serverRunningMenu.cs.meta
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue