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

public class RecordPlayer : MemoryObject {

    public Lounge lounge;
    public RecordSpin recordSpin;

    public override void Interact()
    {
        recordSpin.run = true;
        if (!lounge.part1Done)
        {
            lounge.fadeInObjectsPt1();
            lounge.part1Done = true;
        }

        fadeMaterials = GameObject.FindGameObjectsWithTag(tagName);
        foreach (var item in fadeMaterials)
        {
            if (item.GetComponent<FadeToGrey>())
                item.GetComponent<FadeToGrey>().StartFade(item.GetComponent<FadeToGrey>().rate);
            else
                Debug.Log(item.name.ToUpper() + " HAS NO FADETOGREY SCRIPT!");
        }
    }
}
