Beispiel #1
0
        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]);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        public void removeSection(int index)
        {
            ScriptSection section = sectionList[index];

            sectionList.RemoveAt(index);
        }
Beispiel #5
0
 public void removeSection(ScriptSection sec)
 {
     removeSection(sectionList.IndexOf(sec));
 }
Beispiel #6
0
 public ScriptSection addSection(ScriptSection sec, bool addDefault = true)
 {
     return(addSection(sectionList.IndexOf(sec) + 1, addDefault));
 }