public ScriptSection addSection(int index, bool addDefault = true) { ScriptSection section = new ScriptSection(); sectionList.Insert(index, section); if (addDefault) { section.addCode(2, 0); section.addCode(0, 1, true); section.addCode(0, 2); } return(sectionList[index]); }
public bool loadNewReader(EexBinaryReader reader) { sectionList.Clear(); int sectionNum = reader.readUShort(); for (int j = 0; j < sectionNum; j++) { ScriptSection section = new ScriptSection(); section.loadNewReader(reader); sectionList.Add(section); } return(true); }
public bool loadJson(JObject jobj) { sectionList.Clear(); JArray jar = (JArray)jobj["sections"]; foreach (JObject item in jar) { ScriptSection section = new ScriptSection(); section.loadJson(item); sectionList.Add(section); } return(true); }
public void removeSection(int index) { ScriptSection section = sectionList[index]; sectionList.RemoveAt(index); }
public void removeSection(ScriptSection sec) { removeSection(sectionList.IndexOf(sec)); }
public ScriptSection addSection(ScriptSection sec, bool addDefault = true) { return(addSection(sectionList.IndexOf(sec) + 1, addDefault)); }