public void NextNode(int index) { if (!ConversationModeOn) { return; } if (index == -1) { //exit system ConversationModeOn = false; //in case an unclosed end, send again //Space.DispatchEvent(Events.EndConversation); //Space.DispatchEvent(Events.CloseUI, new UIEvent(this)); Converse = null; CurrentNode = null; //if (UIControl.IsOpened()) // Space.DispatchEvent(Events.CloseDescription); //print(UIControl.IsOpened()); return; } CurrentNode = Converse.GetNode(index); NodeIndex = index; NextAction(); }
void OnDestroy() { if (instance == this) { instance = null; } }
public void EndConversation() { conversationCam.enabled = false; currentConversation = null; currentConversationData = null; currentCameraAction = null; CurrentCameraActionCoroutine = null; }
//public Animator anim; public void StartDialogue(Audiodialog a) { conversationSystem = GetComponent <ConversationSystem>(); //questManager = GameObject.Find("Quest Manager").GetComponent<QuestManager>(); conversating = true; startConvo = true; audiodialog = a; }
private void InitializeConversationSystem() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
public void OnStart(ConversationEvent eventdata) { ConversationModeOn = true; //Space.DispatchEvent(Events.OpenUI, new UIEvent(this)); Converse = eventdata.conversation; //interuptFlags = new List<ConvInteruprt>(); //InteruptFailNode = 0; // PhoneInterupt = false; //ExaminedItem = false; //ExamineInterupt = false; //ItemExamined = null; NextNode(0); //print("on"); }
//---------------------------------------------------------------------------------------------- void Awake() { textBoxSprite = GetComponent <SpriteRenderer>().sprite; spriteRen = GetComponent <SpriteRenderer>(); conversationSystem = GetComponent <ConversationSystem>(); minX = transform.position.x - spriteRen.size.x / 2 + textBoxSprite.border.x / textBoxSprite.pixelsPerUnit; //border.x = left maxX = transform.position.x + spriteRen.size.x / 2 - textBoxSprite.border.z / textBoxSprite.pixelsPerUnit; //border.z = right minY = transform.position.y - spriteRen.size.y / 2 + textBoxSprite.border.y / textBoxSprite.pixelsPerUnit; //border.y = bottom maxY = transform.position.y + spriteRen.size.y / 2 - textBoxSprite.border.w / textBoxSprite.pixelsPerUnit; //border.w = top writingOptions = false; //StartWriting(true, false, indentationX, Dialogue); }
public void ImportConversation(ConversationSystem newConversation) { currentConversation = newConversation; }
public void OnStart(ConversationEvent eventdata) { TimeCheck = eventdata.conversation; NextNode(0); }
public ConversationEvent(string conversationSource, GameObject caller_ = null) { conversation = new ConversationSystem(TextParser.ToJson(conversationSource)); }
public ConversationEvent(TextAsset conversationSource) { conversation = new ConversationSystem(TextParser.ToJson(conversationSource)); }
public ConversationEvent(JsonData conversationSource) { conversation = new ConversationSystem(conversationSource); }