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

public class LeverInteraction : MonoBehaviour {
    [SerializeField] private PlayerInteraction playerInteraction;
    [SerializeField] private Animator animator;

    private const string LEVER_TURNED = "Lever_Pressed";

    private void Awake() {
        playerInteraction.OnLeverInteract += PlayerInteraction_OnLeverInteract;
    }

    private void PlayerInteraction_OnLeverInteract(object sender, System.EventArgs e) {
        animator.SetTrigger(LEVER_TURNED);
        SceneManager.LoadScene("BedRoom");
    }
}
