We don't have that much information to display to the player at this point, but what we do have should be put on screen in a pleasing, noticeable way. Proceed as follows:
- Update GameBehavior with the following code to collect an item:
public class GameBehavior : MonoBehaviour
{
// 1
public string labelText = "Collect all 4 items and win
your freedom!";
public int maxItems = 4;
private int _itemsCollected = 0;
public int Items
{
get { return _itemsCollected; }
set {
_itemsCollected = value;
// 2
if(_itemsCollected >= maxItems)
{
labelText = "You've found all the items!";
}
else
{
labelText = "Item found, only " + (maxItems -
_itemsCollected) + " more to go!"...