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

public class DestroyOnTrigger : MonoBehaviour {

    public weightPlate trigger;
    public bool destroyOnTrigger = true;
    public GameObject triggerObject;

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
        if (trigger.returnState())
        {
            triggerObject.SetActive(!destroyOnTrigger);
            
        }
        else triggerObject.SetActive(destroyOnTrigger);

    }
}
