private void Awake() { _thisRenderer = GetComponent <SpriteRenderer>(); _thisAnimator = GetComponent <Animator>(); _thisTransform = GetComponent <Transform>(); _playerTransform = GameObject.Find("PlayerOLD").transform; _player = _playerTransform.GetComponent <PlayerOLD>(); _UI_Panel = GameObject.Find("TooltipPanelOLD").GetComponent <UI_Update>(); _ahClose = Animator.StringToHash("Close"); _ahOpen = Animator.StringToHash("Open"); }
private void Awake() { _player = _player == null?GetComponent <PlayerOLD>() : _player; if (_player == null) { Debug.LogError("Скрипт 'Player' не установлен на контроллер"); } _inventory = _inventory == null?GetComponent <InventoryOLD>() : _inventory; if (_inventory == null) { Debug.LogError("Скрипт 'Inventory' не установлен на контроллер"); } }