27 lines
662 B
C#
27 lines
662 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class Chooselitem8 : MonoBehaviour
|
||
|
{
|
||
|
public GameObject prefab;
|
||
|
public Transform PrefabTransform;
|
||
|
public Text text;
|
||
|
public static Chooselitem8 Instance;
|
||
|
public JSONReader JSONReader;
|
||
|
public void CreateItem(int ID)
|
||
|
{
|
||
|
GameObject newitem=Instantiate(prefab,PrefabTransform);
|
||
|
foreach (var item in JSONReader.LanguageDictionary)
|
||
|
{
|
||
|
Language languageData = item.Value;
|
||
|
if (languageData.ID==ID)
|
||
|
{
|
||
|
text.text=languageData.Text;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|