Пример #1
0
        private void Start()
        {
            UICharacterItem ui = GetComponent <UICharacterItem>();

            ui.onSetEquippedData.AddListener(OnSetEquippedData);
            ui.onSetUnEquippedData.AddListener(OnSetUnEquippedData);
            ui.onSetUnEquippableData.AddListener(OnSetUnEquippableData);
            ui.onSetStorageItemData.AddListener(OnSetStorageItemData);
            ui.onNpcSellItemDialogAppear.AddListener(OnNpcSellItemDialogAppear);
            ui.onNpcSellItemDialogDisappear.AddListener(OnNpcSellItemDialogDisappear);
            ui.onStorageDialogAppear.AddListener(OnStorageDialogAppear);
            ui.onStorageDialogDisappear.AddListener(OnStorageDialogDisappear);
            ui.onEnterDealingState.AddListener(OnEnterDealingState);
            ui.onExitDealingState.AddListener(OnExitDealingState);
            // Refresh UI data to applies events
            ui.ForceUpdate();
        }