mirror of
https://github.com/thegatesbrowser/godot-multiplayer.git
synced 2025-10-16 02:03:43 -04:00
switch to two voip addon
This commit is contained in:
parent
cf11ceffc4
commit
9ce4caa073
39 changed files with 193 additions and 52 deletions
|
@ -8,18 +8,23 @@ var speak_action: StringName = "speak"
|
|||
|
||||
func _process(_delta: float) -> void:
|
||||
if not Input.is_action_pressed(speak_action) or EditMode.is_enabled:
|
||||
is_speaking = false
|
||||
set_speaking(false)
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if EditMode.is_enabled: return
|
||||
|
||||
if event.is_action_pressed(speak_action):
|
||||
is_speaking = true
|
||||
set_speaking(true)
|
||||
|
||||
if event.is_action_released(speak_action):
|
||||
is_speaking = false
|
||||
set_speaking(false)
|
||||
|
||||
|
||||
func set_speaking(speaking: bool) -> void:
|
||||
if speaking == is_speaking: return
|
||||
is_speaking = speaking
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
is_speaking = false
|
||||
set_speaking(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue