예제 #1
0
    public void InitOrder(ProductElementModel currentProduct)
    {
        Debug.Log(currentProduct.productName);

        if (CheckForProductInOrder(currentProduct) == null)
        {
            currentOrder.listOfProductInOrder.Add(currentProduct);
        }
        CalculatePrice();
    }
예제 #2
0
 public ProductElementModel CheckForProductInOrder(ProductElementModel _currentProduct)
 {
     foreach (var product in currentOrder.listOfProductInOrder)
     {
         if (product.productName == _currentProduct.productName)
         {
             return(product);
         }
     }
     return(null);
 }
예제 #3
0
 public void SetProductData(ProductElementModel _product)
 {
     currentProduct = _product;
     SetUi();
 }