init
This commit is contained in:
commit
001bb14f16
951 changed files with 270074 additions and 0 deletions
17
Assets/Scripts/OptionsManagement/FindLanguageSelector.cs
Normal file
17
Assets/Scripts/OptionsManagement/FindLanguageSelector.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class FindLanguageSelector : MonoBehaviour{
|
||||
|
||||
public Dropdown dropdown;
|
||||
|
||||
private void Start(){
|
||||
dropdown.value = PlayerPrefs.GetInt("Language");
|
||||
}
|
||||
|
||||
public void OnLanguageChange(int languageSelected){
|
||||
PlayerPrefs.SetInt("Language", languageSelected);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bc27923aab962ab4e8260d428699d3b0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
38
Assets/Scripts/OptionsManagement/ImageTranslator.cs
Normal file
38
Assets/Scripts/OptionsManagement/ImageTranslator.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ImageTranslator : MonoBehaviour{
|
||||
|
||||
public GameObject englishText;
|
||||
|
||||
public GameObject spanishText;
|
||||
|
||||
int language;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void OnEnable(){
|
||||
language = PlayerPrefs.GetInt("Language");
|
||||
if (language == 0){
|
||||
englishText.SetActive(true);
|
||||
spanishText.SetActive(false);
|
||||
}
|
||||
if (language == 1){
|
||||
englishText.SetActive(false);
|
||||
spanishText.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
if (language == 0){
|
||||
englishText.SetActive(true);
|
||||
spanishText.SetActive(false);
|
||||
}
|
||||
if (language == 1){
|
||||
englishText.SetActive(false);
|
||||
spanishText.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/OptionsManagement/ImageTranslator.cs.meta
Normal file
11
Assets/Scripts/OptionsManagement/ImageTranslator.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 91f94dc2fb68f8446be28428dad9700f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
26
Assets/Scripts/OptionsManagement/TextTranslator.cs
Normal file
26
Assets/Scripts/OptionsManagement/TextTranslator.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class TextTranslator : MonoBehaviour{
|
||||
|
||||
[TextArea] public string englishText;
|
||||
[TextArea] public string spanishText;
|
||||
|
||||
int language;
|
||||
TextMeshProUGUI text;
|
||||
|
||||
// Start is called before the first frame update
|
||||
public void OnEnable(){
|
||||
text = GetComponent<TextMeshProUGUI>();
|
||||
language = PlayerPrefs.GetInt("Language");
|
||||
if (language == 0){
|
||||
text.text = englishText;
|
||||
}
|
||||
if (language == 1){
|
||||
text.text = spanishText;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/OptionsManagement/TextTranslator.cs.meta
Normal file
11
Assets/Scripts/OptionsManagement/TextTranslator.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8c57de335859cbd498fb9ed39931f3c9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue