private void InitializeSingleton()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(this);
     }
 }
Example #2
0
    private void Awake()
    {
        _PV = GetComponent <PhotonView>();

        _photonGame = PhotonGame.Instance;
        _photonPlayerListingMenu = PhotonPlayerListingMenu.Instance;
        _changeWeaponBar         = ChangeWeaponBar.Instance;
        _uiManager    = UIManager.Instance;
        _player       = PhotonNetwork.LocalPlayer;
        _cameraFollow = CameraFollow.Instance;
    }