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