z-hack/src/Sword.tscn

33 lines
1007 B
Plaintext

[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/sword/base.png" type="Texture" id=1]
[ext_resource path="res://assets/sword/base_droite.png" type="Texture" id=2]
[ext_resource path="res://assets/sword/base_gauche.png" type="Texture" id=3]
[ext_resource path="res://Sword.gd" type="Script" id=4]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 3 ), ExtResource( 1 ), ExtResource( 2 ) ],
"loop": true,
"name": "cut",
"speed": 10.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
radius = 16.0
height = 32.0
[node name="Sword" type="RigidBody2D" groups=["weapons"]]
script = ExtResource( 4 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 1 )
animation = "cut"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -2, -3 )
rotation = 1.5708
shape = SubResource( 2 )
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]