using System.Collections; using System.Collections.Generic; using UnityEngine; public class SettingsPersistance : MonoBehaviour { public static SettingsPersistance INSTANCE; [HideInInspector] public Level level; [HideInInspector] public int turnDuration; [HideInInspector] public int maxPoints; void Awake() { if (INSTANCE == null) { DontDestroyOnLoad(gameObject); INSTANCE = this; } if (INSTANCE != this) { Destroy(gameObject); } defaultValues(); } private void defaultValues() { level = Level.facil; turnDuration = 8; maxPoints = 3; } } public enum Level { facil, normal, dificil }