Esempio n. 1
0
    private void InitView()
    {
        _amount.text         = _model.Amount.Value.ToString();
        _sellPriceLabel.text = "Price: " + _model.UserData.CatalogData.SellPrice;

        GameObject source = (GameObject)Resources.Load("UI/Products/" + _model.UserData.Id, typeof(GameObject));
        GameObject go     = Instantiate(source, _item.transform);

        go.transform.localPosition    = Vector3.zero;
        go.transform.localEulerAngles = Vector3.zero;
        go.transform.localScale       = Vector3.one;

        _dragDropItem      = go.GetComponent <FarmDragDropItem>();
        _dragDropItem.Data = _model.UserData.CatalogData;
    }
Esempio n. 2
0
    private void InitView()
    {
        _amountLabel.text = _model.Amount.Value.ToString();
        _priceLabel.text  = "Price: " + _model.UserData.CatalogData.BuyPrice;

        GameObject source = (GameObject)Resources.Load("UI/FarmItems/DragItems/" + _model.UserData.CatalogData.FarmItemId, typeof(GameObject));

        _item = Instantiate(source, _itemPlaceHolder.transform);
        _item.transform.localPosition    = Vector3.zero;
        _item.transform.localEulerAngles = Vector3.zero;
        _item.transform.localScale       = Vector3.one;

        _dragDropItem      = _item.GetComponent <FarmDragDropItem>();
        _dragDropItem.Data = _model.UserData.CatalogData;
    }