示例#1
0
 private void Awake()
 {
     gm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
     st = GameObject.FindGameObjectWithTag("GameManager").GetComponent <StorageSys>();
     if (questionCreator == null)
     {
         Debug.Log("no question creator assigned!");
     }
 }
示例#2
0
文件: TableSys.cs 项目: e2wugui/zeze
 internal override Storage Open(Application app, Database database)
 {
     if (null != storage)
     {
         throw new Exception("tablesys has opened");
     }
     Zeze    = app;
     storage = new StorageSys(app, database);
     return(storage);
 }
    void Start()
    {
        gm          = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
        st          = GameObject.FindGameObjectWithTag("GameManager").GetComponent <StorageSys>();
        playingQuiz = gm.GetQuizToPlay();
        string path = gm.quizzesDir + sep + playingQuiz + sep + "Otázky";

        //populate the questionList
        IEnumerable <string> jsonFiles = Directory.EnumerateFiles(path, "*.json");
        Otazka ot;

        foreach (string jsonFilePath in jsonFiles)
        {
            Debug.Log(jsonFilePath);

            ot = st.LoadAndReturnQuestion(jsonFilePath);
            questionList.Add(ot);
        }

        ShowQuestion(currentQuestion);
    }
示例#4
0
文件: TableSys.cs 项目: e2wugui/zeze
 internal override void Close()
 {
     storage = null;
 }
示例#5
0
 private void Start()
 {
     st = GameObject.FindGameObjectWithTag("GameManager").GetComponent <StorageSys>();
 }
 private void Awake()
 {
     st = GameObject.FindGameObjectWithTag("GameManager").GetComponent <StorageSys>();
     gm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
 }
示例#7
0
 private void Awake()
 {
     gm              = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
     storageSys      = GameObject.FindGameObjectWithTag("GameManager").GetComponent <StorageSys>();
     questionCreator = GameObject.FindGameObjectWithTag("QuestionCreator").GetComponent <QuestionCreator>();
 }