Esempio n. 1
0
    public void UpdateGraph(ShopAssetListing listing)
    {
        if (!gameObject.activeSelf)
        {
            gameObject.SetActive(true);
        }
        assetListing = listing;
        var data = assetListing.asset;

        if (computer.playerUsing)
        {
            computer.playerUsing.pui.invRender.UpdateAssetPreview(data);
        }
        assetName.text          = data.name;
        lowPrice.text           = "$" + data.baseValue * .5f;
        highPrice.text          = "$" + data.baseValue * 1.8f;
        priceLine.positionCount = 0;
        for (int i = 0; i < data.valueHistory.Count; i++)
        {
            priceLine.positionCount++;
            priceLine.SetPosition(i, new Vector3(50 * i,
                                                 C.RemapFloat(data.valueHistory[i], data.baseValue * .5f, data.baseValue * 1.8f, 0, 240)));
        }
    }
Esempio n. 2
0
 private void Start()
 {
     listing = GetComponentInParent <ShopAssetListing>();
 }