added english pictures and fixed text translations
This commit is contained in:
1 parent
21c73df3eb
commit
563b4800ee
50 files changed
+280
-1787
No files matched your search
@@ -3,7 +3,13 @@ class_name Balloon
|
||||
|
||||
@export var pop_up_text = ""
|
||||
@export var wait_time = 4.0
|
||||
@export var image_path = "res://assets/Images/spiel_ballon_text2.png"
|
||||
@export var image_path: String = "res://assets/Images/spiel_ballon_text2.png"
|
||||
const ENGLISH_BALLOON_IMAGES: Dictionary[String, String] = {
|
||||
"res://assets/Images/spiel_ballon_mail3.png": "res://assets/Images/spiel_ballon_mail_englisch.png",
|
||||
"res://assets/Images/spiel_ballon_mrt3.png": "res://assets/Images/spiel_ballon_mrt_englisch.png",
|
||||
"res://assets/Images/spiel_ballon_bot3a.png": "res://assets/Images/spiel_ballon_bot_englisch.png",
|
||||
"res://assets/Images/spiel_ballon_surveillance3b.png": "res://assets/Images/spiel_ballon_recognition_englisch.png",
|
||||
}
|
||||
@onready var label_3d: Label3D = $Label3D
|
||||
@onready var balloon_model: MeshInstance3D = $Balloon_model
|
||||
@onready var collision_shape_3d: CollisionShape3D = $CollisionShape3D
|
||||
@@ -15,7 +21,10 @@ func _ready() -> void:
|
||||
if child is RigidBody3D:
|
||||
child.freeze = true
|
||||
child.gravity_scale = 0.0
|
||||
$label.texture = load(image_path)
|
||||
var shown_image: String = image_path
|
||||
if TranslationServer.get_locale().begins_with("en") and ENGLISH_BALLOON_IMAGES.has(image_path):
|
||||
shown_image = ENGLISH_BALLOON_IMAGES[image_path]
|
||||
$label.texture = load(shown_image)
|
||||
|
||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||
if not body.is_in_group("throwable"):
|
||||
|
||||
Reference in new issue
Block a user