Beispiel #1
0
 public void EnterEnabledState(NodeAddedEvent e, [Combine] ItemButtonNode button, [Context, JoinByModule] EnabledSlotWithModuleNode slotWithModule, [Context, JoinByTank] HUDNodes.ActiveSelfTankNode self)
 {
     if (slotWithModule.Entity.HasComponent <InventorySlotTemporaryBlockedComponent>())
     {
         button.itemButton.Disable();
     }
     else
     {
         button.itemButton.Enable();
     }
 }
Beispiel #2
0
        private void StartCooldown(SlotCooldownStateNode slot, ItemButtonNode itemButton)
        {
            float timeInSec = (((float)slot.inventoryCooldownState.CooldownTime) / 1000f) - (Date.Now.UnityTime - slot.inventoryCooldownState.CooldownStartTime.UnityTime);

            if (itemButton.itemButton.isRage)
            {
                itemButton.itemButton.StartRageCooldown(timeInSec, slot.Entity.HasComponent <InventoryEnabledStateComponent>());
            }
            else
            {
                itemButton.itemButton.StartCooldown(timeInSec, slot.Entity.HasComponent <InventoryEnabledStateComponent>());
                if (itemButton.itemButton.ammunitionCountWasIncreased && ((itemButton.itemButton.MaxItemAmmunitionCount > 1) && (itemButton.itemButton.ItemAmmunitionCount == 1)))
                {
                    itemButton.itemButton.FinishCooldown();
                }
            }
        }
Beispiel #3
0
 public void OnTankLeaveActiveState(NodeRemoveEvent e, HUDNodes.ActiveSelfTankNode self, [JoinAll, Combine] ItemButtonNode button)
 {
     button.itemButton.Disable();
 }
Beispiel #4
0
 public void Enable(NodeRemoveEvent e, SingleNode <InventorySlotTemporaryBlockedComponent> inventory, [JoinByModule] ItemButtonNode button)
 {
     if (inventory.Entity.HasComponent <InventoryEnabledStateComponent>())
     {
         button.itemButton.Enable();
     }
     else
     {
         button.itemButton.Disable();
     }
 }
Beispiel #5
0
 public void Disable(NodeAddedEvent e, SlotBlockedNode inventory, [Context, JoinByModule] ItemButtonNode button)
 {
     button.itemButton.Disable();
 }
Beispiel #6
0
 public void EnterEnabledState(NodeAddedEvent e, [Combine] ItemButtonNode button, [Context, JoinByModule] PassiveModuleNode passiveModule, [Context, JoinByModule] SlotWithModuleNode slot, [Context, JoinByTank] HUDNodes.ActiveSelfTankNode self)
 {
     button.itemButton.Passive();
 }
Beispiel #7
0
 public void InitializeCooldownFill(NodeRemoveEvent e, SlotCooldownStateNode slot, [JoinByModule] ItemButtonNode itemButton)
 {
     itemButton.itemButton.FinishCooldown();
     if (slot.Entity.HasComponent <InventoryEnabledStateComponent>())
     {
         itemButton.itemButton.Enable();
     }
     else
     {
         itemButton.itemButton.Disable();
     }
 }
Beispiel #8
0
 public void InitializeCooldownFill(NodeAddedEvent e, SlotCooldownStateNode slot, [Context, JoinByModule] ItemButtonNode itemButton)
 {
     this.StartCooldown(slot, itemButton);
 }