Пример #1
0
        private void OnEnable()
        {
            _display      = GetComponentInChildren <MeshRenderer>();
            _linkedEntity = GetComponent <LinkedEntityComponent>();
            _player       = FindObjectOfType <AuthoritativePlayer>();

            _player.SelectedDroneChanged += OnSelectedDroneChanged;

            // Setup initial material.
            _defaultMaterial = _display.sharedMaterial;
            if (IsOwned)
            {
                _display.sharedMaterial = _playerMaterial;
            }
        }
Пример #2
0
 private void OnEnable()
 {
     _connector = FindObjectOfType <UnityClientConnector>();
     _player    = FindObjectOfType <AuthoritativePlayer>();
 }