Newer
Older
Will
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
}