init
This commit is contained in:
commit
001bb14f16
951 changed files with 270074 additions and 0 deletions
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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue