using UnityEngine;

public class DanMachiSceneContainer : SceneContainer
{
    public override KeyframeData SerializeFrame()
    {
        return new KeyframeData();
    }

    public override ObjectContainerSerializable Serialize()
    {
        return new SceneSerializable(this);
    }

    public override void Lerp(KeyframeData frame1, KeyframeData frame2, float amount)
    {
        var frame = (frame1 as KeyframeData).Lerp(frame2, amount) as KeyframeData;
    }

    protected override void OnDestroy()
    {
        if (_applicationQuitting) return;

        for (int i = AllObjects.Count - 1; i >= 0; i--)
        {
            var obj = AllObjects[i];
            if (obj.GetDataType() == DataType.Camera)
            {
                Debug.Log("Destroying cam");
                obj.Frames.Clear();
                obj.SetDefaultFrame();
                continue;
            }
            Destroy(obj.gameObject);
        }

        base.OnDestroy();
    }

    public override void Select()
    {
        //Settings.gameObject.SetActive(true);
    }

    public override void Deselect()
    {
        //Settings.gameObject.SetActive(false);
    }
}