Better support Extra Info
This commit is contained in:
parent
7da22c2461
commit
e84ea6786c
@ -1,9 +1,14 @@
|
||||
tool
|
||||
extends Control
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
|
||||
# update the pivot offset to make sure the object's animations
|
||||
# are always centered
|
||||
$Sprite.rect_pivot_offset = rect_size/2
|
||||
$Particles2D.position = rect_size/2
|
||||
|
||||
|
||||
func set_extra_info(text : String):
|
||||
$"%ExtraInfo".text = text
|
||||
|
@ -130,16 +130,6 @@ speed_scale = 2.0
|
||||
process_material = SubResource( 12 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="ExtraInfo" type="Label" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = SubResource( 7 )
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="Sprite" type="TextureRect" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@ -150,6 +140,17 @@ texture = ExtResource( 2 )
|
||||
expand = true
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="ExtraInfo" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = SubResource( 7 )
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/Disappear = SubResource( 8 )
|
||||
anims/RESET = SubResource( 9 )
|
||||
|
Loading…
Reference in New Issue
Block a user