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

public class FlameOn : MonoBehaviour
{

	// Use this for initialization
	void Start ()
    {
        GetComponent<SwitchTrigger>().disptachOnTriggerStart = SwitchOn;
        GetComponent<SwitchTrigger>().disptachOnTriggerStop = SwitchOff;
	}
	
	// Update is called once per frame
	void Update ()
    {
		
	}

    void SwitchOn()
    {
        GetComponent<SpriteRenderer>().material.color = Color.red;
        Debug.Log("yeah buddy");
    }

    void SwitchOff()
    {
        GetComponent<SpriteRenderer>().material.color = Color.white;
        Debug.Log("oh no buddy");
    }
}
