protected override void start() { base.start(); string path = basicGameControl.name; Debug.Log(path); questions = QuestionContainer.loadQuestion(path); basicGameControl.addEvent("Reset", reset); Console.Add("Success"); Parent.SetActive(false); reset(); }
private void Start() { //string path = gameName; Debug.Log(gameName); questions = QuestionContainer.loadQuestion(gameName); Console.Add("Load Question Container"); Parent.SetActive(false); reset(); // menginstansisai game Object soal question = Parent.transform.GetChild(1).gameObject.GetComponent <Text>(); answer[0] = Parent.transform.GetChild(2).gameObject.GetComponent <Button>(); answer[0].onClick.AddListener(delegate() { this.questionAnswered(0); }); answer[1] = Parent.transform.GetChild(3).gameObject.GetComponent <Button>(); answer[1].onClick.AddListener(delegate() { this.questionAnswered(1); }); answer[2] = Parent.transform.GetChild(4).gameObject.GetComponent <Button>(); answer[2].onClick.AddListener(delegate() { this.questionAnswered(2); }); }