using UnityEngine;
using System.Collections;

public class ShowHideObject : MonoBehaviour {

    public bool doesThisShow = true;
    private bool doOnce = false;
    public GameObject myObject;

    public TriggerEvent tVol;

	// Use this for initialization
	void Start () {

        if(doesThisShow == true)
        {
            myObject.SetActive(false);
        }
	
	}
	
	// Update is called once per frame
	void Update () {
	
            if(tVol.isHere == true)
        {
            if(doesThisShow == true && doOnce == false)
            {
                myObject.SetActive(true);
                doOnce = true;
            }
            else if(doesThisShow == false && doOnce == false)
            {
                myObject.SetActive(false);
                doOnce = true;
            }
        }
	}
}
