Example #1
0
 public void PriceChanged(PriceChangedEvent e, BuyableMarketItemNode item)
 {
     item.priceItem.OldPrice  = (int)e.OldPrice;
     item.priceItem.Price     = (int)e.Price;
     item.xPriceItem.OldPrice = (int)e.OldXPrice;
     item.xPriceItem.Price    = (int)e.XPrice;
 }
Example #2
0
        public void PriceChanged(PriceChangedEvent e, BuyableMarketItemNode item, [JoinAll] ScreenNode screen, [JoinByScreen] SingleNode <SelectedItemComponent> selectedItem)
        {
            bool flag = item.Entity.Equals(selectedItem.component.SelectedItem);

            base.Log.InfoFormat("PriceChanged {0} item={1} itemIsSelected={2}", e, item, flag);
            GameObject buyButton  = screen.garageItemsScreen.BuyButton;
            GameObject xBuyButton = screen.garageItemsScreen.XBuyButton;

            buyButton.GetComponent <PriceButtonComponent>().Price  = e.Price;
            xBuyButton.GetComponent <PriceButtonComponent>().Price = e.XPrice;
            if (flag)
            {
                SetPriceEvent event2;
                if (buyButton.activeSelf)
                {
                    event2 = new SetPriceEvent {
                        Price     = e.Price,
                        OldPrice  = e.OldPrice,
                        XPrice    = e.XPrice,
                        OldXPrice = e.OldXPrice
                    };
                    base.ScheduleEvent(event2, buyButton.GetComponent <EntityBehaviour>().Entity);
                }
                if (xBuyButton.activeSelf)
                {
                    event2 = new SetPriceEvent {
                        Price     = e.Price,
                        OldPrice  = e.OldPrice,
                        XPrice    = e.XPrice,
                        OldXPrice = e.OldXPrice
                    };
                    base.ScheduleEvent(event2, xBuyButton.GetComponent <EntityBehaviour>().Entity);
                }
            }
        }
Example #3
0
 public void PriceChanged(PriceChangedEvent e, PriceForUserNode priceForUser, [JoinAll, Mandatory] UserNode user)
 {
     base.UpdatePriceForUser(e.Price, e.OldPrice, priceForUser.priceLabel, user.userMoney.Money);
 }
Example #4
0
 public void PriceChanged(PriceChangedEvent e, BuyableAvatarMarketItemNode item, [JoinAll] SingleNode <AvatarUIComponent> uiNode)
 {
     uiNode.component.UpdatePrice(item.marketItemGroup.Key);
 }