// +++ class methods ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 private void Init()
 {
     // collect scene references
     _networkManager = GameObject.Find("managers").GetComponent <nvpNetworkManager>();
     if (_networkManager == null)
     {
         Debug.LogError("No Network Manager");
     }
 }
コード例 #2
0
    // +++ class methods ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public void Init()
    {
        _networkManager     = GameObject.Find("managers").GetComponent <nvpNetworkManager>();
        _multiplayerManager = this.gameObject.GetComponent <nvpMultiplayerManager>();

        // enable scene camera
        _rootCamera = GameObject.Find("Main Camera");
        _gameCamera = GameObject.Find("Game Camera");
        _rootCamera.SetActive(false);
        _gameCamera.SetActive(true);
    }
コード例 #3
0
    // +++ class methods ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    void Init()
    {
        // get references
        _networkManager = GameObject.Find("managers").GetComponent <nvpNetworkManager>();
        _sceneManager   = GameObject.Find("managers").GetComponent <nvpSceneManager>();

        // get player prefs
        if (_playerIndex == 1)
        {
            _userName.text = PlayerPrefs.GetString("Player1Name");
            _email.text    = PlayerPrefs.GetString("Player1Email");
            _password.text = PlayerPrefs.GetString("Player1Password");
        }
        else
        {
            _userName.text = PlayerPrefs.GetString("Player2Name");
            _email.text    = PlayerPrefs.GetString("Player2Email");
            _password.text = PlayerPrefs.GetString("Player2Password");
        }
    }
 // +++ unity callbacks ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void Start()
 {
     // Get references
     _networkManager = GameObject.Find("managers").GetComponent <nvpNetworkManager>();
     _sceneManager   = GameObject.Find("managers").GetComponent <nvpSceneManager>();
 }
コード例 #5
0
 // +++ class methods ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 private void Init()
 {
     // get references
     _networkManager = GameObject.Find("managers").GetComponent <nvpNetworkManager>();
     _sceneManager   = GameObject.Find("managers").GetComponent <nvpSceneManager>();
 }