// Update is called once per frame
    void Update()
    {
        _text.text = player.getCurrentTrash() + " / " + player.maxTrash;

        if (player.getCurrentTrash() > player.maxTrash)
        {
            _text.color = fullColor;
        }
        else
        {
            _text.color = normalColor;
        }
    }
Exemple #2
0
 public void giveTrash()
 {
     _progress.addTrash(_trashCollector.getCurrentTrash());
     _trashCollector.clearTrash();
 }