2024-02-27 17:39:47 +02:00
|
|
|
extends StaticBody3D
|
|
|
|
|
|
|
|
@onready var label = $Label3D
|
|
|
|
|
|
|
|
var max_message = 30
|
|
|
|
var messages: Array = ["aaa", "bbb"]
|
|
|
|
|
2024-03-17 18:05:45 +02:00
|
|
|
func log(text: Variant) -> void:
|
2024-04-30 20:18:49 +03:00
|
|
|
messages.append(str(text))
|
2024-02-27 17:39:47 +02:00
|
|
|
|
|
|
|
if messages.size() > max_message:
|
2024-04-30 20:18:49 +03:00
|
|
|
messages.pop_front()
|
2024-02-27 17:39:47 +02:00
|
|
|
|
|
|
|
label.text = "\n".join(messages)
|