Example #1
0
 void Awake()
 {
     lobbyMusicBehavior = FindObjectOfType <LobbyMusicBehavior>();
     inputManager       = FindObjectOfType <CharacterInputManager>();
     musicManager       = FindObjectOfType <MusicManagerBehavior>();
     InitializePanel();
 }
Example #2
0
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Example #3
0
        public void Awake()
        {
            Application.targetFrameRate = 60;
            QualitySettings.vSyncCount  = 0;
            exitButton.gameObject.SetActive(
                Application.platform == RuntimePlatform.WindowsPlayer ||
                Application.platform == RuntimePlatform.OSXPlayer ||
                Application.platform == RuntimePlatform.LinuxPlayer);

            PhotonNetwork.logLevel                 = logLevel;
            PhotonNetwork.autoJoinLobby            = false;
            PhotonNetwork.automaticallySyncScene   = true;
            PhotonNetwork.autoCleanUpPlayerObjects = true;
            PhotonNetwork.sendRate                 = 30;
            PhotonNetwork.sendRateOnSerialize      = 30;

            OpenStartPanel();
            versionText.text = "Game Version: " + Constants.GAME_VERSION;
            PlayerStateContainer.ResetInstance();

            lobbyMusicBehavior = FindObjectOfType <LobbyMusicBehavior>();
            lobbyMusicBehavior.StartMusic();
        }