public void CompleteTutorial(NodeAddedEvent e, TankRentOfferNode rentOffer, [JoinBy(typeof(SpecialOfferGroupComponent))] SingleNode <PersonalSpecialOfferPropertiesComponent> personalOffer, [Context, Combine] TutorialNode tutorial) { if (!tutorial.Entity.HasComponent <TutorialCompleteComponent>()) { tutorial.Entity.AddComponent <TutorialCompleteComponent>(); } }
public void OnDiscountAdded(NodeAddedEvent e, [Combine] TankRentOfferNode good, [Context, JoinBy(typeof(SpecialOfferGroupComponent))] PersonalOfferNode personalOffer) { if (good.Entity.HasComponent <CustomOfferPriceForUIComponent>()) { good.Entity.RemoveComponent <CustomOfferPriceForUIComponent>(); } double num = good.goodsPrice.Price * (1f - personalOffer.discount.DiscountCoeff); num = good.goodsPrice.Round(num); good.Entity.AddComponent(new CustomOfferPriceForUIComponent(num)); }
public void FillPurchaseWindow(NodeAddedEvent e, SingleNode <TankPurchaseScreenComponent> screen, [Context] SingleNode <SelectedPresetComponent> selectedPreset, [JoinBy(typeof(SpecialOfferGroupComponent)), Context, Combine] TankRentOfferNode offer, [JoinBy(typeof(SpecialOfferGroupComponent)), Context] PersonalOfferNode personalOffer, [JoinAll] SingleNode <Dialogs60Component> dialogs) { ShopDialogs shopDialogs = dialogs.component.Get <ShopDialogs>(); screen.component.InitiateScreen(offer.goodsPrice, personalOffer.discount, offer.legendaryTankSpecialOffer.TankRole, shopDialogs); }
public void BuyPreset(ConfirmButtonClickEvent e, SingleNode <TankPurchaseScreenComponent> purchaseScreen, [JoinAll] SingleNode <SelectedPresetComponent> selectedPreset, [JoinBy(typeof(SpecialOfferGroupComponent))] TankRentOfferNode offer, [JoinAll] SelfUserNode selfUser, [JoinAll] SingleNode <TankRentMainScreenElementsComponents> helper, [JoinAll] SingleNode <Dialogs60Component> dialogs) { ShopDialogs dialogs2 = dialogs.component.Get <ShopDialogs>(); purchaseScreen.component.OpenPurchaseWindow(offer.Entity, dialogs2); }
public void SetTimer(NodeAddedEvent e, [Combine] SingleNode <TankRentLeafletComponent> leaflet, [Context, Combine] PersonalOfferWithEndTimeNode personalOffer, [JoinBy(typeof(SpecialOfferGroupComponent)), Context, Combine] TankRentOfferNode offer, [Context] SingleNode <TankRentMainScreenElementsComponents> helper) {
public void SetButtonBehaviour(NodeAddedEvent e, [Combine] PersonalOfferNode personalOffer, [JoinBy(typeof(SpecialOfferGroupComponent)), Context, Combine] TankRentOfferNode offer, [Context] SelfUserNode selfUser, [Context, Combine] OwnedPresetNode preset, [Context] SingleNode <TankRentMainScreenElementsComponents> helper) { if (preset.userGroup.Key != selfUser.userGroup.Key) { helper.component.SetButtonToScreenDisplayState(); } }
public void ScheduleButtonHide(NodeAddedEvent e, PersonalOfferWithEndTimeNode personalOffer, [Context, JoinBy(typeof(SpecialOfferGroupComponent)), Combine] TankRentOfferNode offer) { float timeInSec = (float)(personalOffer.specialOfferEndTime.EndDate - Date.Now); base.NewEvent(new HideOfferButtonEvent()).Attach(personalOffer).ScheduleDelayed(timeInSec); }