public void AddEnum(string className, string enumName, IEnumerable <KeyValuePair <string, int> > values) { LuaBase parent = this; if (className != null) { parent = objects[className]; } LuaEnum @enum = null; if (parent.ContainsObject(enumName)) { @enum = (LuaEnum)parent[enumName]; } else { @enum = new LuaEnum(enumName); parent.AddChild(@enum); } if (values != null) { foreach (var value in values) { @enum.AddValue(value.Key, value.Value); } } }
public void Write(LuaBase luaBase, string location = null) { luaBase.Write(this.writer, location); foreach (var childObject in luaBase.GetAllChildren()) { this.Write(childObject, luaBase.Name); } }
public void Write(LuaBase luaBase, string location = null) { luaBase.Write(this.writer, location); foreach (var childObject in luaBase.GetAllChildren()) { this.Write(childObject, luaBase.Name); } }
public void AddMethod(string className, string methodName, IEnumerable <string> parameters) { LuaBase parent = this; if (className != null) { parent = objects[className]; } if (!parent.ContainsObject(methodName)) { parent.AddChild(new LuaMethod(methodName, parameters)); } }
public void AddFunction(string className, string functionName, IEnumerable <string> parameters) { LuaBase parent = this; if (className != null) { parent = objects[className]; } if (!parent.ContainsObject(functionName)) { parent.AddChild(new LuaFunction(functionName, parameters)); } }
public void AddChild(LuaBase luaBase) { this.objects[luaBase.Name] = luaBase; }
public void AddChild(LuaBase luaBase) { this.objects[luaBase.Name] = luaBase; }