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

public class MovingPlatformSwitch : MonoBehaviour
{
    public TriggeredMovingPlatform m_platform;

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

    void SwitchOff()
    {
        m_platform.SetIsTriggered(false);
    }
}
