public IDialogueContext GetContextOfType(DialogueTypes.Type type, int index = 0) { index = Clamp(type, index); if (dialogueDic.ContainsKey(type)) { return(dialogueDic[type][index]); } return(null); //else // return CreateInstance<ScriptedDialogue>(); }
public ScriptedDialogue GetDialogueOfType(DialogueTypes.Type type) { // If the bundles contains the key then return the dialogue but if it doesnt then return an empty scripted dialogue. return((dialogueBundlesDic.ContainsKey(type)) ? dialogueBundlesDic[type] : CreateInstance <ScriptedDialogue>()); }
public void Draw() { type = (DialogueTypes.Type)EditorGUILayout.EnumPopup(type); proceedToNextSpeaker = EditorGUILayout.Toggle("Proceed to next speaker?", proceedToNextSpeaker); }
public SerializedTypedNode(int order, Vector2 pos, DialogueTypes.Type type) { this.order = order; this.position = pos; this.type = type; }
public void Init(DialogueTypes.Type type, bool proceedToNextSpeaker) { this.type = type; this.proceedToNextSpeaker = proceedToNextSpeaker; }
private int Clamp(DialogueTypes.Type type, int index = 0) { int contextLength = dialogueDic[type].Length; return((index > contextLength) ? contextLength : index); }
public ScriptedDialogue ReactToDialogue(DialogueTypes.Type type) { return(dialogueBundle.GetDialogueOfType(type)); }
public virtual IDialogueContext Respond(DialogueTypes.Type type) { return(dialogueData.GetDialogueOfType(type)); }