using System.Collections.Generic;
using Mr.BrickAdventures.scripts.Resources;
namespace Mr.BrickAdventures.scripts.State;
///
/// Data for the current gameplay session.
/// Reset when player dies or completes a level.
///
public class SessionState
{
///
/// Current level index being played.
///
public int CurrentLevel { get; set; }
///
/// Coins collected during this session (not yet saved).
///
public int CoinsCollected { get; set; }
///
/// Skills unlocked during this session (not yet saved).
///
public List SkillsUnlocked { get; set; } = new();
///
/// Creates a fresh session state.
///
public static SessionState CreateDefault() => new()
{
CurrentLevel = 0,
CoinsCollected = 0,
SkillsUnlocked = new List()
};
///
/// Resets session state to defaults.
///
public void Reset()
{
CoinsCollected = 0;
SkillsUnlocked.Clear();
}
///
/// Resets completely including level.
///
public void ResetAll()
{
CurrentLevel = 0;
CoinsCollected = 0;
SkillsUnlocked.Clear();
}
}