-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.gd
More file actions
26 lines (20 loc) · 810 Bytes
/
main.gd
File metadata and controls
26 lines (20 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
extends Node
func _ready():
$Connection.connect("text_received", Callable(self, "_on_text_received"))
$Connection.connect("sound_received", Callable(self, "_on_sound_received"))
$Connection.connect("GMCP_received", Callable(self, "_on_GMCP_received"))
$Input.connect("cmd_text_submitted", Callable(self, "_on_cmd_text_submitted"))
func _on_text_received(data: String) -> void:
$TextProcessor._update_lines(data)
func _on_sound_received(data: Dictionary) -> void:
#print(data)
pass
func _on_GMCP_received(data: Dictionary) -> void:
var topic = data.get("topic")
var topic_details = data.get("data")
#print(topic)
#print("------------------------------")
#print(data)
#print("------------------------------")
func _on_cmd_text_submitted(data: String) -> void:
$Connection.send_message(data)