Ejemplo n.º 1
0
        public override string Write()
        {
            StringBuilder Code = new StringBuilder();

            Code.AppendLine(IndentLevel.GetIndent() + "new SimGroup(" + objname + ") {");
            IndentLevel.indentLevel++;
            foreach (var item in GroupItems)
            {
                Code.AppendLine(item.Write());
            }
            IndentLevel.indentLevel--;
            Code.AppendLine(IndentLevel.GetIndent() + "};");
            return(Code.ToString()); //End of chapter
        }
Ejemplo n.º 2
0
        public override string Write()
        {
            StringBuilder Code = new StringBuilder();

            Code.AppendLine(IndentLevel.GetIndent() + "new Sun(" + objname + ") {");
            IndentLevel.indentLevel++;
            Code.AppendLine(IndentLevel.GetIndent() + "direction = \"" + Direction.ToString() + "\";");
            Code.AppendLine(IndentLevel.GetIndent() + "color = \"" + Color.ToString() + "\";");
            Code.AppendLine(IndentLevel.GetIndent() + "ambient = \"" + Ambient.ToString() + "\";");
            if (dynamicFields.Count != 0)
            {
                foreach (KeyValuePair <string, string> dynamicfield in dynamicFields) //dynamic field handling
                {
                    Code.AppendLine(IndentLevel.GetIndent() + dynamicfield.Key + " = \"" + dynamicfield.Value + "\";");
                }
            }
            IndentLevel.indentLevel--;
            Code.AppendLine(IndentLevel.GetIndent() + "};");
            return(Code.ToString());
        }
Ejemplo n.º 3
0
        public override string Write()
        {
            StringBuilder Code = new StringBuilder();

            Code.AppendLine(IndentLevel.GetIndent() + "new Sky(" + objname + ") {");
            IndentLevel.indentLevel++;
            Code.AppendLine(IndentLevel.GetIndent() + "position = \"" + Position.ToString() + "\";");
            Code.AppendLine(IndentLevel.GetIndent() + "rotation = \"" + Rotation.ToString() + "\";");
            Code.AppendLine(IndentLevel.GetIndent() + "scale = \"" + Scale.ToString() + "\";");
            Code.AppendLine(IndentLevel.GetIndent() + "materialList = \"" + Skybox + "\";");
            if (dynamicFields.Count != 0)
            {
                foreach (KeyValuePair <string, string> dynamicfield in dynamicFields) //dynamic field handling
                {
                    Code.AppendLine(IndentLevel.GetIndent() + dynamicfield.Key + " = \"" + dynamicfield.Value + "\";");
                }
            }
            IndentLevel.indentLevel--;
            Code.AppendLine(IndentLevel.GetIndent() + "};");
            return(Code.ToString());
        }