using UnityEngine;
using System.Collections;

public class Lights : MonoBehaviour {

    Player mPlayer;

	void Start()
    {
        mPlayer = GetComponentInParent<Player>();
        mPlayer.lightsOffEvent += TurnOff;
    }

    private void TurnOff()
    {
        gameObject.SetActive(false);
    }
}
