Пример #1
0
    void UpdateRenewable(ref IRenewable activeRenewable)
    {
        RenewableTypes activeRenewableType     = activeRenewable.Type;
        Sprite         activeHardwareBubSprite = DataAssociations.GetRenewableTypeBubImage(activeRenewableType);

        renewableBubImage.sprite = activeHardwareBubSprite;

        activeRenewable.DurationUpdater  = null;
        activeRenewable.DurationUpdater += GeneratePercentDurationUpdater();

        activeRenewable.CooldownPercentUpdater  = null;
        activeRenewable.CooldownPercentUpdater += GenerateCooldownPercentUpdater();

        activeRenewable.CooldownDurationUpdater  = null;
        activeRenewable.CooldownDurationUpdater += GenerateCooldownDurationUpdater();
    }
    void DisplayAndActivateDiscoveredRenewables()
    {
        for (int i = 0; i < renewableTypes.Length; i++)
        {
            RenewableTypes renewableType = renewableTypes[i];
            if (InventoryController.HasDiscoveredRenewable(renewableType))
            {
                Sprite discoverableRenewableBubImage = DataAssociations.GetRenewableTypeBubImage(renewableType);
                renewableInventoryImages[i].sprite = discoverableRenewableBubImage;

                EventTrigger trigger = renewableInventoryEventTriggers[i];

                AssignDragEventListeners(trigger, discoverableRenewableBubImage, renewableType);
            }
        }
    }
Пример #3
0
 void UpdateEquippedRenewable(InventoryData inventory)
 {
     activeRenewableImage.sprite = DataAssociations.GetRenewableTypeBubImage(inventory.EquippedRenewable);
 }