SceneController.cs 597 Bytes
Newer Older
1
2
using UnityEngine;
using SimpleJSON;
3
using System.IO;
4
5
6
7
8
9

namespace dlu
{

public class SceneController : MonoBehaviour
{
10
    [HideInInspector]
11
12
    public JSONArray instruction = null;
    public string importInstructionFile = "Assets/DLU/Resources/instruction.json";
13

14
15
    public void Start()
    {
16
        if (this.instruction == null)
17
        {
18
            this.instruction = LoadInstruction(this.importInstructionFile);
19
20
        }
    }
21

22
    public JSONArray LoadInstruction(string json)
23
    {
24
        return JSON.Parse(File.ReadAllText(json)) as JSONArray;
25
    }
26
27
28
}

}