This commit is contained in:
bingus_violet 2024-03-13 16:15:55 -05:00
parent 279b5e5599
commit 4f70414ed9
46 changed files with 1485 additions and 170 deletions

View file

@ -0,0 +1,10 @@
extends Area2D
@export var animator : AnimationPlayer
@export var animation : String
@export var playOnce := true
var animReady = false
func _on_body_shape_entered(body_rid, body, body_shape_index, local_shape_index):
animator.play(animation)

View file

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://dc8odchuhx80d"]
[ext_resource type="Script" path="res://Objects/AnimTrigger/AnimTrigger.gd" id="1_n4pxa"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ilg2i"]
[node name="AnimTrigger" type="Area2D"]
collision_layer = 4
script = ExtResource("1_n4pxa")
[node name="Collider" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_ilg2i")
[connection signal="body_shape_entered" from="." to="." method="_on_body_shape_entered"]