private void ProcessCurrentNode() { switch (currentNode.GetType()) { case var type when type == typeof(StartNode): StartNode startNode = (StartNode)currentNode; break; case var type when type == typeof(DialogNode): DialogNode dialogNode = (DialogNode)currentNode; string speech = dialogNode.currentDialog.CharacterText.Text; var character = dialogNode.currentDialog.CharacterText.Character; string speaker = character == Characters.Narrator ? "" : character.ToString(); DialogSystem.Say(speech, speaker); break; case var type when type == typeof(ChoiceNode): break; case var type when type == typeof(BranchNode): break; default: break; } }