using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RPGCreationKit.DialogueSystem;
namespace RPGCreationKit
{
///
/// Used on objects that can be talked to, with the player or other Dialoguables.
///
public interface IDialoguable
{
///
/// Sets the Speaker Index to the entity
///
///
void SetSpeakerIndex(int index);
int GetSpeakerIndex();
///
/// Initializes the dialogue logic
///
/// On the entities:
/// Given the graph:
void DialogueLogic(IDialoguable[] entities, DialogueGraph dialogue);
///
/// Executes a DialogueNode
///
/// The node
/// On the entities
///
IEnumerator ExecuteDialogueNode(XNode.Node _node, IDialoguable[] _entities);
///
/// The Entity will reach the target and speak to it with its current DialogueGraph
///
///
void SpeakToEntity(IDialoguable target);
///
/// The entity will change its current DialogueGraph
///
/// The new DialogueGraph
void ChangeDialogueGraph(DialogueGraph _newDialogueGraph);
///
/// Returns true if the Dialoguable Entity can perform a conversation.
///
///
bool CanDialogue();
///
/// Gets the name of the dialoguable entity
///
///
string GetDialoguableName();
///
/// Code that runs as soon as someone starts talking with this entity
///
void OnDialogueStarts(GameObject target);
///
/// Code that runs when the entity has finished dialoguing.
///
void OnDialogueEnds(GameObject target);
///
/// Gets the current DialogueGraph of the entity
///
///
DialogueGraph GetCurrentDialogueGraph();
///
/// Called when the entity has to speak a line of dialogue.
///
///
void OnSpeakALine(NPCDialogueLineNode currentNode);
///
/// Called when the entity finish his line, usually used to reset its state.
///
void OnFinishedSpeakingALine();
///
/// Gets the entity transform, used to look at the entity while speaking to it. This can be null.
///
///
Transform GetEntityLookAtPos();
///
/// Gets the GameObject of this Dialoguable.
///
///
GameObject GetEntityGameObject();
///
/// Plays an audio clip, usually the voice file of the current dialogue line.
///
/// The clip to play
void PlayAudioClip(AudioClip clip);
///
/// Stops any audio clip this IDialoguable is playing.
///
void StopAudio();
///
/// Returns wheter or not the entity is speaking a line or not.
///
///
bool IsTalking();
Animator GetAnimator();
void ForceToStopDialogue();
}
}