Пример #1
0
 // Use this for initialization
 public void Initialize(CharacterEntity entity)
 {
     SetCharacterPortrait(entity.Icon);
     CharacterDataChanged(entity);
     entity.OnDataChanged += CharacterDataChanged;
     entity.EntityInventory.onCurrencyUpdated += CurrencyChanged;
     if (m_inventoryView != null)
     {
         m_inventoryView.InitializeInventoryView(entity, entity.EntityInventory.ClientInventoryItemClicked);
     }
     CurrencyChanged(entity.EntityInventory.Currency);
 }
Пример #2
0
 // Use this for initialization
 public void Initialize(CharacterEntity entity)
 {
     if (!m_initialized)
     {
         foreach (BaseItemContainer item in InventoryManager.Instance.m_items)
         {
             ItemButton newButton = Instantiate <ItemButton>(m_itemButtonPrefab);
             newButton.transform.SetParent(m_itemContainer);
             newButton.UpdateItemContainer(item, ShowStoreItem);
         }
         if (m_inventoryView != null)
         {
             m_inventoryView.InitializeInventoryView(entity, ShowInventoryItem);
         }
         m_initialized = true;
     }
 }