void TakeAction(HostOrJoin choice) { hostOrJoin = choice; //Start or join, not both. if (hostOrJoin == HostOrJoin.Host) { StartServer(); } if (hostOrJoin == HostOrJoin.Join) { //If we're joining, create a MasterServiceInterface to provide us with the interface for selecting a server msInterface = this.gameObject.AddComponent <MasterServerInterface>(); //Provide a call back for when a server is selected. msInterface.OnServerSelected += HandleOnServerSelected; } }
void TakeAction(HostOrJoin choice) { hostOrJoin = choice; //Start or join, not both. if(hostOrJoin == HostOrJoin.Host) { StartServer(); } if(hostOrJoin == HostOrJoin.Join) { //If we're joining, create a MasterServiceInterface to provide us with the interface for selecting a server msInterface = this.gameObject.AddComponent<MasterServerInterface>(); //Provide a call back for when a server is selected. msInterface.OnServerSelected += HandleOnServerSelected; } }