-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
VFXOption.cs
58 lines (51 loc) · 1.4 KB
/
VFXOption.cs
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace SALT
{
public class VFXOption : MonoBehaviour
{
private PauseOption po;
private Language currentLanguage;
private void Start()
{
this.po = this.GetComponent<PauseOption>();
this.SetStrings();
this.po.currentSelection = PlayerPrefs.GetInt("vfx", 0);
this.SetVFX();
}
private void Update()
{
if (this.currentLanguage == MainScript.language)
return;
this.SetStrings();
}
internal void SetStrings()
{
List<string> stringList = new List<string>();
if (MainScript.language == Language.Japanese)
{
stringList.Add("オン");
stringList.Add("オフ");
}
else
{
stringList.Add("On");
stringList.Add("Off");
}
this.po.selectionStrings = stringList;
this.currentLanguage = MainScript.language;
}
public void SetVFX()
{
Patches.PoundVFXPatch.SetEnabled(this.po.currentSelection == 0);
PlayerPrefs.SetInt("vfx", this.po.currentSelection);
}
private void Awake()
{
}
private void OnDestroy()
{
}
}
}