mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
11 lines
391 B
GDScript3
11 lines
391 B
GDScript3
|
# (c) 2023-present Eroax
|
||
|
# (c) 2023-present Yagich
|
||
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||
|
class_name Util
|
||
|
|
||
|
|
||
|
## Connects the [param p_func] to [param p_signal] if that connection doesn't already exist.
|
||
|
static func safe_connect(p_signal: Signal, p_func: Callable) -> void:
|
||
|
if not p_signal.is_connected(p_func):
|
||
|
p_signal.connect(p_func)
|