From e78fee0e2125900ee0d4dc3019ef61ffea4b520d Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sun, 1 Oct 2023 17:49:38 +0400 Subject: [PATCH] Trash_Can anim --- src/models/enemies/trash_can/TrashCan.tscn | 11 +++++- .../enemies/trash_can/sprites/spawn.png | Bin 0 -> 919 bytes .../trash_can/sprites/spawn.png.import | 35 +++++++++++++++++ .../sprites/trash_can_spriteframes.tres | 36 +++++++++++++++++- src/models/enemies/trash_can/trash_can.gd | 15 ++++++-- 5 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 src/models/enemies/trash_can/sprites/spawn.png create mode 100644 src/models/enemies/trash_can/sprites/spawn.png.import diff --git a/src/models/enemies/trash_can/TrashCan.tscn b/src/models/enemies/trash_can/TrashCan.tscn index fdec38a..8cde8e8 100644 --- a/src/models/enemies/trash_can/TrashCan.tscn +++ b/src/models/enemies/trash_can/TrashCan.tscn @@ -13,7 +13,8 @@ script = ExtResource( 2 ) [node name="Sprite" type="AnimatedSprite" parent="."] position = Vector2( 3, 0 ) frames = ExtResource( 1 ) -animation = "rolling" +animation = "spawn" +frame = 6 playing = true [node name="EnemyCollider" type="Area2D" parent="."] @@ -21,3 +22,11 @@ playing = true [node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyCollider"] position = Vector2( 3.5, 5 ) shape = SubResource( 1 ) + +[node name="Spawn_Animation_Start" type="Timer" parent="."] +wait_time = 0.5 +one_shot = true +autostart = true + +[connection signal="animation_finished" from="Sprite" to="." method="_on_sprite_animation_finished"] +[connection signal="timeout" from="Spawn_Animation_Start" to="." method="_on_Spawn_Animation_Start_timeout"] diff --git a/src/models/enemies/trash_can/sprites/spawn.png b/src/models/enemies/trash_can/sprites/spawn.png new file mode 100644 index 0000000000000000000000000000000000000000..be2ca210b58561f51872bc86af506da370ffdfc5 GIT binary patch literal 919 zcmV;I18Dq-P)Px&QAtEWRA_Fc>|q`V8G+X&06*t$Bzmbzuk_16v2wrB`C_$PQB2Qi*3^ zcXyT!RU-8@D%BmZbDdn{5c~5Dq&X7G4{-eD%klSP0|N#O7|<86t_^4lDdp9_6+%b= zjB^eEVC?eaw&AUhF`Z5?5;yS*ApoFaXYD%xz;rro&C5AAkL4IK{9wYy|JwBjia{?y z2qBB2U`dkbYXCr#Bd$S~Wzf8uyZ#a>AcT;dbBf8z07&HnvdM3IZd1H3iC3MB3P8P} zC`vX(MujZP%5xz^DKf$r$J8g@?CucGh!z`3k}xAGNJL2GI(>v-j7pgMNu#%ENO_2wrDpHK@?GH6D>P$w;T|-r&s@Oiz)IfjDvVciDqg zuh^~_Uv8w>uBiN3<0TN6=?70<=Z{@G13JQyrMk&X;&fnu-&WD%yN~4;-+umhBJkx^ z&VBszySx>P_hG*&32dUX?Usb_*0-~$?X~ecMe_CS2R!UI7u6ObGFOKgxOYgyJDEwt zxyYz)DtI&+d9N#FS$2_kKA(F>v_A2g{%wqCEqG(wYbzxh7i^EmBLjdu&tV>q z$79gqrHj{_v}e5c=3ke+PNDt!{0V8AR_419A$1FD`@e6_ck%A`d+)BO tPrNYv+qUcM(q6Bw6S%DqJn-Hp??1J`|D;-IWFP