public void TryActivate(UpdateEvent e, HUDNodes.SelfBattleUserAsTankNode self, [JoinByUser, Combine] HUDNodes.Modules.SlotWithModuleNode slot, [JoinByModule] SingleNode <ItemButtonComponent> hud, [JoinByModule] NotAutostartModuleNode module) { if (slot.Entity.HasComponent <InventoryEnabledStateComponent>()) { if (slot.Entity.HasComponent <InventorySlotTemporaryBlockedComponent>()) { foreach (KeyValuePair <string, Slot> pair in this.actionToSlotMap) { if (InputManager.GetActionKeyDown(pair.Key) && (slot.slotUserItemInfo.Slot == ((Slot)pair.Value))) { hud.component.PressedWhenDisable(); } } } else { foreach (KeyValuePair <string, Slot> pair2 in this.actionToSlotMap) { if (InputManager.GetActionKeyDown(pair2.Key) && (slot.slotUserItemInfo.Slot == ((Slot)pair2.Value))) { hud.component.Activate(); base.ScheduleEvent <ActivateModuleEvent>(slot); } } } } }
public void PlayChangeCooldownSpeedHUDAnimation(BattleUserInventoryCooldownSpeedChangedEvent e, SingleNode <BattleUserInventoryCooldownSpeedComponent> battleUser, [JoinByUser, Combine] HUDNodes.Modules.SlotWithModuleNode slot, [JoinByModule] SingleNode <ItemButtonComponent> hud) { hud.component.SetCooldownCoeff(battleUser.component.SpeedCoeff); hud.component.isRage = !hud.component.isRage; }