Raise-Your-Wand/Scenes/Animations/rockThrowAnim.tscn
nc5432 847a41eaad Animations and bug fixes
- Converted the rock throw animation to the new system
- Converted the fireball animation to the new system (needs to be inverted still)
- Spell variable now get set to null after use or they get interrupted
- Made some code more readable
2024-05-13 22:38:17 -04:00

179 lines
5.1 KiB
Plaintext

[gd_scene load_steps=15 format=3 uid="uid://c44hesqr12wxd"]
[ext_resource type="Script" path="res://Scripts/Animations/rockThrowAnim.gd" id="1_owh0v"]
[ext_resource type="Texture2D" uid="uid://dwsd0hggrxbdq" path="res://Sprites/Animations/Rock Pack/Rocks 64x64 by Captainskeleto.png" id="2_addwy"]
[ext_resource type="Resource" uid="uid://dl6nv6lp460n3" path="res://Resources/Spells/rockThrow.tres" id="2_apcu7"]
[sub_resource type="Curve2D" id="Curve2D_m36l3"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 30, 39, 0, 0, 0, 0, 69, 45, 0, 0, 0, 0, 114, 61, 0, 0, 0, 0, 164, 98, 0, 0, 0, 0, 217, 179, 0, 0, 0, 0, 258, 318, 0, 0, 0, 0, 272, 436, 0, 0, 0, 0, 281, 600)
}
point_count = 8
[sub_resource type="AtlasTexture" id="AtlasTexture_wqvpx"]
atlas = ExtResource("2_addwy")
region = Rect2(128, 192, 64, 64)
[sub_resource type="Animation" id="Animation_7dh1k"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(342, 645)]
}
[sub_resource type="Animation" id="Animation_5o8xe"]
resource_name = "attackInverse0"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(760, 645), Vector2(760, 440)]
}
[sub_resource type="Animation" id="Animation_clfp2"]
resource_name = "attackInverse1"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(760, 440), Vector2(760, 280)]
}
[sub_resource type="Animation" id="Animation_hypvd"]
resource_name = "attackInverse2"
length = 0.23
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(760, 280), Vector2(342, 331)]
}
[sub_resource type="Animation" id="Animation_cfsn4"]
resource_name = "attackSegment0"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 2,
"values": [Vector2(342, 645), Vector2(342, 440)]
}
[sub_resource type="Animation" id="Animation_uphdx"]
resource_name = "attackSegment1"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(342, 440), Vector2(342, 280)]
}
[sub_resource type="Animation" id="Animation_mlgwv"]
resource_name = "attackSegment2"
length = 0.23
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("TextureRect:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.23),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(342, 280), Vector2(852, 331)]
}
[sub_resource type="Animation" id="Animation_y7nwk"]
resource_name = "fail"
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cg24k"]
_data = {
"RESET": SubResource("Animation_7dh1k"),
"attackInverse0": SubResource("Animation_5o8xe"),
"attackInverse1": SubResource("Animation_clfp2"),
"attackInverse2": SubResource("Animation_hypvd"),
"attackSegment0": SubResource("Animation_cfsn4"),
"attackSegment1": SubResource("Animation_uphdx"),
"attackSegment2": SubResource("Animation_mlgwv"),
"fail": SubResource("Animation_y7nwk")
}
[node name="RockThrowAnim" type="Node2D"]
script = ExtResource("1_owh0v")
finalIndex = 3
spell = ExtResource("2_apcu7")
[node name="Path2D2" type="Path2D" parent="."]
position = Vector2(339, 632)
curve = SubResource("Curve2D_m36l3")
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D2"]
position = Vector2(30, 39)
rotation = 0.152649
rotates = false
loop = false
[node name="TextureRect" type="TextureRect" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 342.0
offset_top = 645.0
offset_right = 406.0
offset_bottom = 709.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset = Vector2(31.8413, 32.0651)
texture = SubResource("AtlasTexture_wqvpx")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_cg24k")
}
[connection signal="animation_finished" from="AnimationPlayer" to="." method="animFinished"]