示例#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>();
 }