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

public class ExitSwitch : MonoBehaviour
{
    public SwitchesAndExit m_Controller;

    // Use this for initialization
    void Start()
    {
        GetComponent<SwitchTrigger>().disptachOnTriggerStart = SwitchOn;
        GetComponent<SwitchTrigger>().disptachOnTriggerStop = SwitchOff;
    }

    void SwitchOn()
    {
        m_Controller.SetIsTriggered(gameObject);
    }

    void SwitchOff()
    {
        m_Controller.SetIsNotTriggered(gameObject);
    }
}
