void RegisterPlayer()
        {
            ID = "Playa" + _inputManager.PlayerNum;
            transform.name = ID;
            nickname = ID;

            scoreManager = GameObject.Find ("Score Manager").GetComponent<ScoreManagerCouch> ();

            networkManager = GameObject.Find ("_NetworkManager");
            _networkController = networkManager.GetComponent<PlayersManager> ();
            _networkController.RegisterOfflinePlayer (ID);
        }
Example #2
0
        void Start()
        {
            _isOffline = GameObject.FindObjectOfType<PlayersManager> ().isOffline;
            if (_isOffline) {
                // Offline
                scoreManagerOffline = GameObject.Find ("Score Manager").GetComponent<ScoreManagerCouch> ();
                _lastChangeCounter = scoreManagerOffline.GetChangeCounter () - 1;

            } else {
                // Online
                scoreManager = GameObject.Find ("Score Manager").GetComponent<ScoreManager> ();
                _lastChangeCounter = scoreManager.GetChangeCounter () - 1;
            }
        }