using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : Photon.MonoBehaviour {
public GameObject[] spawnSpots;
public int state = 0;
void Connect()
{
PhotonNetwork.ConnectToBestCloudServer("V1.0");
state = 1;
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI()
{
switch (state)
{
case 0:
if (GUI.Button(new Rect(10,10,100,30), "Connect"))
{
Connect();
}
break;
case 1:
GUI.Label(new Rect(10, 10, 100, 30), "Connected");
break;
}
}
}