public virtual void Interact(Player_InteractionControl player) { if (!has_conversation_started) { dialogue_script.start_dialogue(dialogue, player, this); player.movementEnabled = false; player.dialogueActive = true; has_conversation_started = true; } else { dialogue_script.display_next_sentence(player, this); } }
// Update is called once per frame void Update() { bool is_interacting = interactor_script.get_is_interacting(); if (is_in && is_interacting) { interactor_rb.constraints = RigidbodyConstraints2D.FreezePositionX | RigidbodyConstraints2D.FreezePositionY; if (!has_conversation_started) { has_conversation_started = true; dialogue_script.start_dialogue(dialogue); } else { dialogue_script.display_next_sentence(); } } }