using System.Collections; using System.Collections.Generic; using UnityEngine; namespace GameplayIngredients.Actions { public class GameSaveLoadSaveAction : ActionBase { public enum Action { Load, Save, } public GameSaveManager.Location saveLocation = GameSaveManager.Location.System; public Action action = Action.Load; public byte UserSaveIndex = 0; public override void Execute() { if(action == Action.Load) { if (saveLocation == GameSaveManager.Location.System) Manager.Get().LoadSystemSave(); else Manager.Get().LoadUserSave(UserSaveIndex); } else { if (saveLocation == GameSaveManager.Location.System) Manager.Get().SaveSystemSave(); else Manager.Get().SaveUserSave(UserSaveIndex); } } } }