Création d'un petit party-game anonyme de Build + Bagar sous Unity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class UI_Inventory : MonoBehaviour
  5. {
  6. private Inventory inventory;
  7. private void Awake()
  8. {
  9. }
  10. public void SetInventory(Inventory _inventory)
  11. {
  12. inventory = _inventory;
  13. inventory.OnItemListChanged += Inventory_OnItemListChanged;
  14. RefreshInventoryItems();
  15. }
  16. private void Inventory_OnItemListChanged(object sender, System.EventArgs e)
  17. {
  18. RefreshInventoryItems();
  19. }
  20. private void RefreshInventoryItems()
  21. {
  22. // TODO refresh UI
  23. }
  24. }