 using UnityEngine;
using System.Collections;
using System;

public class Widget : MonoBehaviour 
{
	//input widgets: knob, slider, lever, button, switch
	//output widgets: indicatorLight, gauge, error display


	//by doing the "set; get;" stuff here we're hiding this bool from editor
	//this flag determines 
	public bool isAvailable = true; 
	public bool IsAvailable {set; get;}
	public bool isOutput = false; 
	public Track trackToReportTo = null;
    public GameControler gameController;
    public System.Random rnd = new System.Random();


	virtual public void createTargetValue(Track listeningTrack)
	{
        this.trackToReportTo = listeningTrack;
        this.isAvailable = false;
	}

    virtual public void clearTargetValue()
    {
        this.trackToReportTo = null;
        this.isAvailable = true;
    }

    virtual public string getTargetValueInstruction()
    {
        return "BASE STRING REPRESENTATION";
    }

    virtual public void setStateToTarget()
    {

    }

    virtual public void handleSuccess()
    {

    }

	// Use this for initialization
	public void Start () 
	{
        gameController = GameObject.FindObjectOfType<GameControler>();
	}
	
	// Update is called once per frame
	public virtual void Update () 
	{
	
	}
}

