Beispiel #1
0
        private void Awake()
        {
            _manager = FindObjectOfType <NetworkManagerWrapper>();
            _manager.Players.OnPlayerConnected    += CreateLine;
            _manager.Players.OnPlayerDisconnected += RemoveLine;
            _players = _manager.Players.GetPlayers();

            _lines = new Dictionary <int, GameObject>();
            PopulateList();
        }
Beispiel #2
0
        void Setup()
        {
            _manager = FindObjectOfType <NetworkManagerWrapper>();
            _manager.OnClientStarted         += Hide;
            _manager.OnDiconnectedFromServer += Show;

            Show();

            DontDestroyOnLoad(gameObject);
        }
        private void Awake()
        {
            if (_instance == null)
            {
                _instance = this;
            }
            else
            {
                Destroy(this.gameObject);
                return;
            }

            _netMan = FindObjectOfType <NetworkManagerWrapper>();
            _netMan.OnConnectedToServer     += OnConnected;
            _netMan.OnDiconnectedFromServer += OnDisconnected;
            _netMan.OnServerStarted         += OnServerCreated;

            IsVrDevice = ForceVr;

            DontDestroyOnLoad(this.gameObject);
        }
Beispiel #4
0
 void Setup()
 {
     _manager = FindObjectOfType <NetworkManagerWrapper>();
 }