| 12345678910111213141516171819202122232425262728293031 | 
							- 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()
 
-     {
 
-         bool isChinese = TextAutoLanguage2.GetLanguage() == LanguageEnum.Chinese;
 
-         SetLanguageObjects(ScoreObj, isChinese);
 
-         SetLanguageObjects(ShotObj, isChinese);
 
-         SetLanguageObjects(HitObj, isChinese);
 
-         SetLanguageObjects(HitRateObj, isChinese);
 
-     }
 
-     private void SetLanguageObjects(GameObject[] objects, bool isChinese)
 
-     {
 
-         if (objects == null || objects.Length < 2) return;
 
-         objects[0].SetActive(isChinese);
 
-         objects[1].SetActive(!isChinese);
 
-     }
 
- }
 
 
  |