private bool DialogShouldIncludeOption(DialogTreeOption option) { bool allow = true; if (option.RequiredSwitch) { if (!GameController.Instance.IsSwitchSet(option.RequiredSwitch)) { allow = false; } } if (option.PreventingSwitch) { if (GameController.Instance.IsSwitchSet(option.PreventingSwitch)) { allow = false; } } return(allow); // TODO?!?!?! /* * if ((option.DisabledByDefault && !DialogEnabledOptions.Contains(option.tag)) || DialogDisabledOptions.Contains(option.tag)) * { * return false; * } * return true; */ }
public void DialogTreeMouseClick(GameObject dialogTreeOption) { if (!CurrentDialogTree) { return; } int index = dialogTreeOption.GetComponent <GameUIObjectController>().index; DialogTreeOption option = CurrentDialogTree.Options[index]; DialogTreeClear(); if (option.Cutscene) { CutsceneStart(option.Cutscene); } else if (option.DialogTree) { DialogTreeDisplay(option.DialogTree); } }