Exemplo n.º 1
0
        void PurchaseFunction()
        {
            if (attribute.number == 0)
            {
                return;
            }
            //购买
            int money = attribute.money * attribute.number;

            if (SaveSprite.Model.money < money)
            {
                PanelManager.Instantiate.ErrorPanel.Open("钱不够");
                return;
            }
            SaveSprite.AddMoney(money * -1);
            SaveSprite.AddProp(attribute, CurrentNumber);
            PanelManager.Instantiate.BackPack.OnUpdate();
        }
Exemplo n.º 2
0
 void SellFunction()
 {
     //出售
     SaveSprite.AddMoney(attribute.money * Config.sell);
     SaveSprite.RemoveIndexProp(this.attribute, PropIndex, CurrentNumber);
 }