using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameOverUI : MonoBehaviour { public GameObject[] ScoreObj; public GameObject[] ShotObj; public GameObject[] HitObj; public GameObject[] HitRateObj; // Start is called before the first frame update void Start() { int index = (int)TextAutoLanguage2.GetLanguage(); //== LanguageEnum.Chinese; SetLanguageObjects(ScoreObj, index); SetLanguageObjects(ShotObj, index); SetLanguageObjects(HitObj, index); SetLanguageObjects(HitRateObj, index); } private void SetLanguageObjects(GameObject[] objects, int index) { if (objects == null) return; for (int i = 0; i < objects.Length; i++) { objects[i].SetActive(index == i); } } }