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

public class EnterScript : MonoBehaviour {

    public SwitchTrigger triggerScript;
    Animator anim;
    private void Start()
    {
        anim = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update ()
    {
        if(this.transform.parent.transform.localScale.x == -1)
			this.transform.localScale = new Vector3 (-1,1,1);
        if(this.transform.parent.transform.localScale.x == 1)
			this.transform.localScale = new Vector3 (1,1,1);

		if(triggerScript == null)
        {
            return;
        }
        if (triggerScript.canBeJumpedTo)
        {
            anim.SetBool("Enabled", true);
        }
        else
        {
            anim.SetBool("Enabled", false);
        }

	}
}
