using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class Doors : MonoBehaviour {
  public Transform left;
  public Transform rght;
  public AudioClip openSound;
  public float moveDistance;
  public float moveTime = 2f;

  public void Open() {
    AudioController.Instance.Source.PlayOneShot(openSound);
    left.DOLocalMoveX(left.localPosition.x + moveDistance, moveTime).SetEase(Ease.InQuad);
    rght.DOLocalMoveX(rght.localPosition.x - moveDistance, moveTime).SetEase(Ease.InQuad);
  }
}
