Ejemplo n.º 1
0
        public static void AppendSubClasses(Arma3ClassObject o, StringBuilder s, int tabs)
        {
            string tab = new String('\t', tabs);

            s.AppendLine().Append(tab).Append("class ").AppendLine(o.ClassName).Append(tab).AppendLine("{");

            foreach (var item in o.ClassMembers)
            {
                if (item.include)
                {
                    if (item.surroundWithQuotation)
                    {
                        s.AppendLine().Append(tab + '\t').Append(item.paramName).Append(" = ").Append("\"").Append(item.paramValue).Append("\"").Append(";");
                    }
                    else
                    {
                        s.AppendLine().Append(tab + '\t').Append(item.paramName).Append(" = ").Append(item.paramValue).Append(";");
                    }
                }
            }

            foreach (var item in o.SubClasses)
            {
                AppendSubClasses(item, s, tabs + 1);
            }

            s.AppendLine().Append(tab).AppendLine("};");
        }
Ejemplo n.º 2
0
 public void InsertSubClass(Arma3ClassObject targetClass, Arma3ClassObject sourceClass)
 {
     targetClass.SubClasses.Add(sourceClass);
 }