Completely refractor the project so the code isn't so terrible #7

Merged
CactiChameleon9 merged 39 commits from card-rework into main 2022-08-24 09:51:59 +01:00
2 changed files with 16 additions and 10 deletions
Showing only changes of commit e84ea6786c - Show all commits

View File

@ -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

View File

@ -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 )