| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class ReadJsons : MonoBehaviour
- {
- public static ReadJsons single;
- void Awake()
- {
- single = this;
- }
- ID ID;
- public int camera_id()
- {
- if (ID == null)
- {
- ID = ReadJosn.LoadJsonFromFile("Setting.json").ID;
- }
- // return 0;
- return int.Parse(ID.cameraid);
- }
- public int map_id()
- {
- if (ID == null)
- {
- ID = ReadJosn.LoadJsonFromFile("Setting.json").ID;
- }
- // return 0;
- return int.Parse(ID.mapid);
- }
- public int excel_id()
- {
- if (ID == null)
- {
- ID = ReadJosn.LoadJsonFromFile("Setting.json").ID;
- }
- //return 0;
- return int.Parse(ID.excelid);
- }
- }
|