using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/*
    Synchronizes a text element with games money balance.
*/
public class Money : MonoBehaviour {
    private GameMenu gm;

    void Update()
    {
        if (gm == null)
            gm = GameObject.Find("ViewController").GetComponent<GameMenu>();

        GetComponent<Text>().text = gm.money.ToString();
    }
}
