public void InitWithBaseScene(GameUIFairyTalePopUp baseScene, ElfAnswerItem data) { this.mBaseScene = baseScene; this.data = data; this.answerData = data; this.CreateObjects(); this.Refresh(); }
private GUIElfAnswerLine AddElfAnswerLine(ElfAnswerItem data) { if (this.mElfAnswerLinePrefab == null) { this.mElfAnswerLinePrefab = Res.LoadGUI("GUI/GUIElfAnswerLine"); } if (this.mElfAnswerLinePrefab == null) { global::Debug.LogError(new object[] { "Res.Load GUI/GUIElfAnswerLine error" }); return null; } GameObject gameObject = Tools.AddChild(this.chatTable.gameObject, this.mElfAnswerLinePrefab); GUIElfAnswerLine gUIElfAnswerLine = gameObject.AddComponent<GUIElfAnswerLine>(); gUIElfAnswerLine.InitWithBaseScene(this, data); gUIElfAnswerLine.name = string.Format("{0:D3}", ++this.cacheSortNo); return gUIElfAnswerLine; }