Crab scene

This commit is contained in:
Dylan Sarrazyn
2024-04-08 10:08:44 +02:00
committed by BimDav
parent 77fb7be3dc
commit 79f5e5f737
3 changed files with 13 additions and 10 deletions
+5 -4
View File
@@ -225,13 +225,13 @@ sprites = [NodePath("AnimatedSprite2D")]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="SpriteControl"]
unique_name_in_owner = true
position = Vector2(103, 90)
sprite_frames = SubResource("SpriteFrames_g5q5i")
animation = &"idle1"
animation = &"idle2"
autoplay = "idle1"
frame = 5
frame_progress = 1.0
frame_progress = 0.00802341
centered = false
offset = Vector2(-5, 0)
offset = Vector2(-108, -90)
[node name="PercentMarginContainer" type="Container" parent="."]
layout_mode = 2
@@ -275,6 +275,7 @@ theme_override_styles/hover = SubResource("StyleBoxEmpty_g8ffa")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_fwwak")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_tdur1")
theme_override_styles/focus = SubResource("StyleBoxEmpty_1h5my")
disabled = true
[connection signal="animation_finished" from="SpriteControl/AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
+1 -1
View File
@@ -93,7 +93,7 @@ func _on_crab_hit(stimulus: Dictionary) -> void:
var tween: = create_tween()
tween.tween_property(crab, "position", Vector2(crab_x, -180), 0.5)
# TODO FIX
#tween.parallel().tween_property(crab.animated_sprite, "rotation_degrees", 540.0, 0.5)
tween.parallel().tween_property(crab.animated_sprite, "rotation_degrees", 540.0, 0.5)
await tween.finished
# Make the crab disappear in the hole
+7 -5
View File
@@ -6,15 +6,15 @@
[ext_resource type="PackedScene" uid="uid://cge0uyn30tcpv" path="res://sources/utils/fx/highlight.tscn" id="3_5uhvd"]
[ext_resource type="Script" path="res://sources/utils/percent_margin_container.gd" id="3_vllju"]
[ext_resource type="PackedScene" uid="uid://c6klih3h3ws6f" path="res://sources/utils/auto_size_label.tscn" id="4_26xiq"]
[ext_resource type="SpriteFrames" uid="uid://dkemftb4jdxvs" path="res://sources/minigames/jellyfish/green_jellyfish_animations.tres" id="5_jgmvp"]
[ext_resource type="SpriteFrames" uid="uid://dquynn3nx52o" path="res://sources/minigames/jellyfish/red_jellyfish_animations.tres" id="5_ei020"]
[ext_resource type="PackedScene" uid="uid://dlmbxcgiv8tpr" path="res://sources/utils/fx/wrong.tscn" id="6_w1tlu"]
[node name="Jellyfish" type="MarginContainer"]
custom_minimum_size = Vector2(400, 400)
offset_right = 400.0
offset_bottom = 400.0
scale = Vector2(1.16534, 1.16534)
script = ExtResource("1_06uwq")
color = 1
[node name="BackFX" type="Control" parent="."]
custom_minimum_size = Vector2(0, 220)
@@ -54,11 +54,13 @@ sprites = [NodePath("AnimatedSprite2D")]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="SpriteControl"]
unique_name_in_owner = true
scale = Vector2(1.84332, 1.84332)
sprite_frames = ExtResource("5_jgmvp")
position = Vector2(200.8, 109.84)
scale = Vector2(2.15054, 2.15054)
sprite_frames = ExtResource("5_ei020")
animation = &"idle"
frame_progress = 0.547024
frame_progress = 0.444917
centered = false
offset = Vector2(-93.3722, -51.0754)
[node name="PercentMarginContainer" type="Container" parent="."]
layout_mode = 2