コード例 #1
0
        void Trade()
        {
            var order = new HarborOrder(TradeView.DataSource);

            if (Player.CanBuy(order))
            {
                Harbor.Sell(order);
                Player.Buy(order);
            }
            else
            {
                var message = string.Format("Not enough money to buy items. Available: {0}; Required: {1}", Player.Money, order.Total());
                Notify.Template("NotifyTemplateSimple").Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true);
            }
        }
コード例 #2
0
ファイル: JRPGShop.cs プロジェクト: TechniPoet/WarBeat
        void Sell()
        {
            var order = new JRPGOrder(PlayerItems.DataSource);

            if (Shop.CanBuy(order))
            {
                Shop.Buy(order);
                Player.Sell(order);
            }
            else
            {
                var message = string.Format("Not enough money in shop to sell items. Available: {0}; Required: {1}", Shop.Money, order.Total());
                Notify.Template("NotifyTemplateSimple").Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true);
            }
        }
コード例 #3
0
ファイル: JRPGShop.cs プロジェクト: yy1985710/SupremeEcsRx
        void Buy()
        {
            var order = new JRPGOrder(ShopItems.DataSource);

            if (Player.CanBuy(order))
            {
                Shop.Sell(order);
                Player.Buy(order);
            }
            else
            {
                var message = string.Format("Not enough money to buy items. Available: {0}; Required: {1}", Player.Money, order.Total());
                notify.Template().Show(message, customHideDelay: 3f, sequenceType: NotifySequence.First, clearSequence: true);
            }
        }