using CrazyGames;
using Photon.Pun;
using UnityEngine.SceneManagement;

public class LoadingScene : MonoBehaviourPunCallbacks
{
    void Start()
    {
        CrazySDK.Init(() =>
        {
            Logger.Log("CrazyGames SDK initialized, started connecting to Photon...");
            PhotonNetwork.ConnectUsingSettings();
        });
    }

    public override void OnConnectedToMaster()
    {
        Logger.Log("Connected to Photon Master Server, loading Lobby scene...");
        SceneManager.LoadScene("Lobby");
    }
}
