Ejemplo n.º 1
0
    public Text buyText;                 // This is the text attached to the item

    // Start is called before the first frame update
    void Start()
    {
        playerInventory = GameObject.Find("Inventory").GetComponent <money_script>(); // This finds the player's inventory
        buyText.text    = "$" + price;                                                // This displays the price under the item
    }
Ejemplo n.º 2
0
    public GameObject spawn;       // This is the object that is spawned

    // Start is called before the first frame update
    void Start()
    {
        playerInventory = GameObject.Find("Inventory").GetComponent <money_script>(); // We find the player's inventory
    }