/*
<copyright file="BGUNSaveLoadA.cs" company="BansheeGz">
    Copyright (c) 2018-2021 All Rights Reserved
</copyright>
*/

using System.IO;
using MaxyGames.uNode;
using UnityEngine;
using Application = UnityEngine.Application;

namespace BansheeGz.BGDatabase
{
    public abstract class BGUNSaveLoadA : IFlowNode
    {
        public const string FileExt = "sav";
        public string fileName;
        public bool debug;

        protected string FilePath => Path.ChangeExtension(Path.Combine(Application.persistentDataPath, fileName), FileExt);

        protected void Log(string message)
        {
            if (!debug) return;
            Debug.Log(message);
        }

        public abstract void Execute(object graph);
    }
}