powerfun-unity/Assets/PFUIImage.cs

31 lines
579 B
C#
Raw Permalink Normal View History

2021-12-14 18:10:58 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PFUIImage : PFUIPanel
{
[SerializeField] Sprite zhImage;
protected override void Awake()
{
if (zhImage == null) return;
var lang = App.GetLocalLanguage();
if (lang == "zh")
{
GetComponent<Image>().sprite = zhImage;
}
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}