Quantum
cf3a29d7c3
Added doors Fixed holding force distance Inmcreased interaction ray length Fixed player not walking when looking up/down Added placeholder crosshair Added group trigger Made monitor rigid body Fixed lighting Added sound emitters for kreb
21 lines
463 B
GDScript
21 lines
463 B
GDScript
extends Area3D
|
|
|
|
@export var group: String
|
|
var activated_lockout = false
|
|
|
|
|
|
signal state_changed(pressed: bool)
|
|
signal activated_once()
|
|
|
|
|
|
func _on_body_entered(body: Node3D) -> void:
|
|
if body.is_in_group(group):
|
|
state_changed.emit(true)
|
|
if not activated_lockout:
|
|
activated_lockout = true
|
|
activated_once.emit()
|
|
|
|
|
|
func _on_body_exited(body: Node3D) -> void:
|
|
if body.is_in_group(group):
|
|
state_changed.emit(false)
|