예제 #1
0
 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);
     }
 }
예제 #2
0
    // 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();
            }
        }
    }