Esempio n. 1
0
    void Awake()
    {
        phase2 = FindObjectOfType <Phase2Manager>();
        //snap to match grid
        Helper.SnapToGrid(this.transform);
        //cost = price;
        Phase2Manager.currency -= cost;
        phase2.UpdateCurrency();

        SoundManager.PlaySound("place2");
    }
Esempio n. 2
0
    void Awake()
    {
        //find the phase 2 manager script
        phase2 = FindObjectOfType <Phase2Manager>();

        //snap to match grid
        Helper.SnapToGrid(this.transform);

        //remove the cost of this item from the total currency
        Phase2Manager.currency -= cost;

        //update the currency ui element
        phase2.UpdateCurrency();

        SoundManager.PlaySound("place1");
    }