using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class QuestObjective : MonoBehaviour {
    public Image image;
    public Text text;

    bool _checked = false;
    string name;
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    public void Init(string name)
    {
        this.name = name;
        _checked = false;

        text.text = name;
        image.color = new Color(0, 0, 0, 1);
    }

    public void Check()
    {
        if (!_checked)
        {
            _checked = true;
            print("checked " + name);
            image.color = new Color(0, 1, 0, 1);
        }
    }
}
