copy from thegates-jam repo

This commit is contained in:
Nordup 2024-03-31 09:25:42 +04:00
parent c1a7ad74e1
commit 1a335de566
523 changed files with 22408 additions and 0 deletions

25
voip/microphone.gd Normal file
View file

@ -0,0 +1,25 @@
extends AudioStreamPlayer
class_name Microphone
static var is_speaking: bool
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
func _unhandled_input(event: InputEvent) -> void:
if EditMode.is_enabled: return
if event.is_action_pressed(speak_action):
is_speaking = true
if event.is_action_released(speak_action):
is_speaking = false
func _exit_tree() -> void:
is_speaking = false