using UnityEngine;
using System.Collections;

public class AltarInteract : Interact {

    private Altar altar;

    enum AltarState { enabled, disabled };
    private AltarState altarState = AltarState.enabled;

	// Use this for initialization
	protected override void Start () {
        base.Start();
        altar = GetComponent<Altar>();
	}
	
	// Update is called once per frame
	protected override void Use () {
        //altarState = AltarState.disabled;
        altar.Use();
	}

    protected override void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            if(altarState == AltarState.enabled && other.GetComponent<Player>().HasArtefact())
            {
                canInteract = true;
                base.ActivateSpinnerEvent();
            }
        }
    }
}
