private static void MergeVariables(DialogueDatabase destination, DialogueDatabase source, NewIDs newIDs) { foreach (var variable in source.variables) { if (newIDs.variable.ContainsKey(variable.id)) { Variable newVariable = new Variable(variable); newVariable.id = newIDs.variable[variable.id]; ConvertFieldIDs(newVariable.fields, newIDs); destination.variables.Add(newVariable); } } }
private static void ConvertVariables(PixelCrushers.DialogueSystem.ChatMapper.ChatMapperProject chatMapperProject, DialogueDatabase database) { database.variables = new List<Variable>(); int id = 0; foreach (var chatMapperVariable in chatMapperProject.Assets.UserVariables) { Variable variable = new Variable(chatMapperVariable); variable.id = id; id++; database.variables.Add(variable); } }
public Variable CreateVariable(int id, string name, string value) { Variable variable = new Variable(); variable.fields = CreateFields(variableFields); variable.id = id; variable.Name = name; variable.InitialValue = value; return variable; }