Beispiel #1
0
    public void OnModuleWasUpgraded(ModuleUpgradedEvent e, UserModuleNode userModule, [JoinByModule] SlotWithUIAndModuleNode selectedSlot, UserModuleNode userModule2, [JoinByParentGroup] Optional <ModuleCardNode> moduleCard)
    {
        int level = (int)userModule.moduleUpgradeLevel.Level;

        if (level == userModule.moduleCardsComposition.UpgradePrices.Count)
        {
            selectedSlot.slotUI.UpgradeIcon.gameObject.SetActive(false);
        }
        else if (!moduleCard.IsPresent())
        {
            selectedSlot.slotUI.UpgradeIcon.gameObject.SetActive(false);
        }
        else if (userModule.moduleCardsComposition.UpgradePrices[level].Cards > moduleCard.Get().userItemCounter.Count)
        {
            selectedSlot.slotUI.UpgradeIcon.gameObject.SetActive(false);
        }
    }
Beispiel #2
0
 public void OnModuleUpgraded(ModuleUpgradedEvent e, ModuleNode node)
 {
     base.ScheduleEvent <ModuleChangedEvent>(node);
 }
 public void OnModuleWasUpgraded(ModuleUpgradedEvent e, SelectedModuleNode module, [JoinAll] SelectedSlotNode selectedSlot, [JoinAll] EquipButtonNode equipButton, [JoinAll] SelfUserMoneyNode selfUserMoney, [JoinAll] SingleNode <ModulesScreenUIComponent> screen)
 {
     this.UpdateButtons(screen.component, selectedSlot, module, equipButton, selfUserMoney);
 }
 public void ModuleWasUpgrade(ModuleUpgradedEvent e, UserModuleWithUINode userModuleWithUI, [JoinByParentGroup] Optional <ModuleCardNode> moduleCards, [JoinAll] Optional <SelectedSlotWithModuleNode> selectedSlot)
 {
     this.SetModuleLevel(userModuleWithUI.moduleCardItemUi, userModuleWithUI.moduleUpgradeLevel, userModuleWithUI.moduleCardsComposition, moduleCards);
     this.SelectMountedModuleCard(userModuleWithUI.moduleCardItemUi, userModuleWithUI.moduleGroup, selectedSlot);
 }