public int AddDialog() { if (dialogObject.dialog == null) { dialogObject.dialog = new DialogObject.Dialog[0]; } int i = dialogObject.dialog.Length; List <DialogObject.Dialog> dialogs = new List <DialogObject.Dialog>(dialogObject.dialog); DialogObject.Dialog d = new DialogObject.Dialog(); d.ID = i; dialogs.Add(d); dialogObject.dialog = dialogs.ToArray(); return(i); }
public bool isDialogConditionsMet(DialogObject.Dialog d) { bool met = true; if (d.conditions.isOneTime && DialogVars.Instance.GetValue(d.conditions.oneTimeID)) { met = false; } if (!string.IsNullOrEmpty(d.conditions.varID)) { met = DialogVars.Instance.GetValue(d.conditions.varID) == d.conditions.varState; } return(met); }