Ejemplo n.º 1
0
    private void Awake()
    {
        if (instance != null)
        {
            Debug.LogWarning("More than one instance of equipped inventory found");
            GameObject.Destroy(this);
            return;
        }

        instance = this;
    }
Ejemplo n.º 2
0
    void Start()
    {
        mainCam = Camera.main;

        combatManager                   = GetComponent <CombatManager>();
        combatManager.playerStats       = player.stats;
        combatManager.playerHealthBarUI = player.GetComponentInChildren <HealthBarUI>();
        combatManager.DisablePlayerHealthBar();

        inventory = GetComponent <Inventory>();
        inventory.inventoryHandler = this;

        inventoryEquipped = GetComponent <InventoryEquipped>();
        inventoryEquipped.equipmentHandler = this;

        dataTransferManager = GameObject.FindGameObjectWithTag(TagRepository.dataTransferManager).GetComponent <DataTransferManager>();

        ReadDataTransferInventory();
        ReadDataTransferEquipment();
    }