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

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