Exemple #1
0
    // Get the current oracle information
    public OracleData GetNewOracleData()
    {
        var sellableItems  = ItemManager.instance.itemsData.GetSellableItems();
        var itemName       = sellableItems[UnityEngine.Random.Range(0, sellableItems.Count)].ItemNameKey;
        int bestPriceIndex = marketPrices.GetBestPriceIndex(itemName);

        oracleData = new OracleData(bestPriceIndex, itemName);
        Debug.Log("Got oracle data, Best price: " + oracleData.bestPriceIndex + " for item: " + oracleData.itemName);


        return(oracleData);
    }