// Start is called before the first frame update void Start() { cam = GetComponent <Camera>(); spotlight = GameObject.Find("Torch").GetComponent <TorchRotate>(); player = GameObject.Find("CharacterRobotBoy (1)").GetComponent <Platformer2DUserControl>(); Debug.Log("spotlight START enabled " + spotlight.GetComponent <BoxCollider2D>().enabled); }
// Use this for initialization void Start() { // Get the Component called TorchRotate from this torch, and set it to disabled. That way we can enable it when its time to do it torch = GetComponent <TorchRotate>(); torch.enabled = false; }