コード例 #1
0
        private void Awake()
        {
            _backpackContents = GetComponent <BackpackContents>();

            _graphicRaycaster = contentsUI.GetComponent <GraphicRaycaster>();
            if (_graphicRaycaster == null)
            {
                _graphicRaycaster = contentsUI.AddComponent <GraphicRaycaster>();
            }
            _eventSystem = FindObjectOfType <EventSystem>();
        }
コード例 #2
0
 private void Awake()
 {
     _backpackContents = GetComponent <BackpackContents>();
 }
コード例 #3
0
 private void Awake()
 {
     _backpackContents = GetComponent <BackpackContents>();
     _weapons          = new Weapon[_backpackContents.contentsSize];
 }