Professional Documents
Culture Documents
Launcher 1
Launcher 1
Launcher 1
Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using TMPro;
using Photon.Realtime;
using System.Linq;
void Awake()
{
Instance = this;
}
void Start()
{
Debug.Log("Connecting to Master");
PhotonNetwork.ConnectUsingSettings();
}
ModeMain = "METAVERSE";
Debug.Log("ModeMain " + ModeMain);
ModeMain = "SHOOTER";
Debug.Log("ModeMain " + ModeMain);
if (ModeMain == "METAVERSE")
{
Debug.Log("Load Level Metaverse");
PhotonNetwork.LoadLevel(1);
}
if (ModeMain == "SHOOTER")
{
Debug.Log("Load Level Shooter");
PhotonNetwork.LoadLevel(2);
}
//PhotonNetwork.LoadLevel(1); //
JOIN ROOM LANGSUNG MAIN GAME
//MenuManager.Instance.OpenMenu("loading2");
//MenuManager.Instance.OpenMenu("room");
//roomNameText.text = PhotonNetwork.CurrentRoom.Name;
//startGameButton.SetActive(PhotonNetwork.IsMasterClient);
}
if (ModeMain == "SHOOTER")
{
PhotonNetwork.LoadLevel(2);
}
}