public void addOrder(IMarket market, string goodName, float price, float num, bool isBuy) { if (isBuy) { if (ContainerDic["money"] >= price * num) { ContainerDic["money"] -= price * num; market.AddOrder(new Order(goodName, price, num, isBuy, onOrderDeal)); } else { Debug.Log("X!"); return; } } else { if (ContainerDic[goodName] >= num) { ContainerDic[goodName] -= num; market.AddOrder(new Order(goodName, price, num, isBuy, onOrderDeal)); } else { Debug.Log("X!"); return; } } }