// Update is called once per frame void Update() { if (is_activated) { sr.color = new Color(0, 0, 0, 1); } else { sr.color = new Color(1, 1, 1, 1); } // check bool is_interacting = interactor_script.get_is_interacting(); if (is_in && is_interacting) { if (is_button) { is_activated = true; } else { is_activated = !is_activated; } } }
// Update is called once per frame void Update() { // check bool is_interacting = interactor_script.get_is_interacting(); if (is_in && is_interacting) { interactor_rb.constraints = RigidbodyConstraints2D.FreezePositionX | RigidbodyConstraints2D.FreezePositionY; StopAllCoroutines(); StartCoroutine(popup(item)); } }
// 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(); } } }