Worked on animations
This commit is contained in:
parent
49e769e330
commit
98a952273f
@ -10,6 +10,23 @@ _data = {
|
|||||||
}
|
}
|
||||||
point_count = 3
|
point_count = 3
|
||||||
|
|
||||||
|
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_6walw"]
|
||||||
|
particles_animation = true
|
||||||
|
particles_anim_h_frames = 6
|
||||||
|
particles_anim_v_frames = 5
|
||||||
|
particles_anim_loop = false
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cjfl8"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
emission_shape = 6
|
||||||
|
emission_ring_axis = Vector3(0, 0, 1)
|
||||||
|
emission_ring_height = 1.0
|
||||||
|
emission_ring_radius = 15.0
|
||||||
|
emission_ring_inner_radius = 0.0
|
||||||
|
gravity = Vector3(0, 98, 0)
|
||||||
|
anim_speed_min = 1.0
|
||||||
|
anim_speed_max = 1.0
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3joqa"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3joqa"]
|
||||||
atlas = ExtResource("2_a2rii")
|
atlas = ExtResource("2_a2rii")
|
||||||
region = Rect2(0, 0, 100, 100)
|
region = Rect2(0, 0, 100, 100)
|
||||||
@ -445,30 +462,11 @@ animations = [{
|
|||||||
"speed": 60.0
|
"speed": 60.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_6walw"]
|
|
||||||
particles_animation = true
|
|
||||||
particles_anim_h_frames = 6
|
|
||||||
particles_anim_v_frames = 5
|
|
||||||
particles_anim_loop = false
|
|
||||||
|
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cjfl8"]
|
|
||||||
particle_flag_disable_z = true
|
|
||||||
emission_shape = 6
|
|
||||||
emission_ring_axis = Vector3(0, 0, 1)
|
|
||||||
emission_ring_height = 1.0
|
|
||||||
emission_ring_radius = 15.0
|
|
||||||
emission_ring_inner_radius = 0.0
|
|
||||||
gravity = Vector3(0, 98, 0)
|
|
||||||
scale_min = 0.5
|
|
||||||
scale_max = 0.5
|
|
||||||
anim_speed_min = 1.0
|
|
||||||
anim_speed_max = 1.0
|
|
||||||
|
|
||||||
[node name="FireballAnim" type="Node2D"]
|
[node name="FireballAnim" type="Node2D"]
|
||||||
script = ExtResource("1_eh23w")
|
script = ExtResource("1_eh23w")
|
||||||
startPrimaryLoc = Vector2(193, 137)
|
startPrimaryLoc = Vector2(193, 137)
|
||||||
startSecondaryLoc = Vector2(350, 137)
|
startSecondaryLoc = Vector2(350, 137)
|
||||||
fullSize = 8.0
|
fullSize = 7.0
|
||||||
|
|
||||||
[node name="Path2D" type="Path2D" parent="."]
|
[node name="Path2D" type="Path2D" parent="."]
|
||||||
curve = SubResource("Curve2D_chn67")
|
curve = SubResource("Curve2D_chn67")
|
||||||
@ -479,14 +477,15 @@ rotation = -1.5708
|
|||||||
rotates = false
|
rotates = false
|
||||||
loop = false
|
loop = false
|
||||||
|
|
||||||
|
[node name="GPUParticles2D" type="GPUParticles2D" parent="Path2D/PathFollow2D"]
|
||||||
|
material = SubResource("CanvasItemMaterial_6walw")
|
||||||
|
rotation = 1.5708
|
||||||
|
emitting = false
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_cjfl8")
|
||||||
|
texture = ExtResource("3_unynm")
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Path2D/PathFollow2D"]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Path2D/PathFollow2D"]
|
||||||
rotation = 1.5708
|
rotation = 1.5708
|
||||||
scale = Vector2(1e-05, 1e-05)
|
scale = Vector2(1e-05, 1e-05)
|
||||||
sprite_frames = SubResource("SpriteFrames_xup3y")
|
sprite_frames = SubResource("SpriteFrames_xup3y")
|
||||||
autoplay = "default"
|
autoplay = "default"
|
||||||
|
|
||||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
|
|
||||||
material = SubResource("CanvasItemMaterial_6walw")
|
|
||||||
amount = 5
|
|
||||||
process_material = SubResource("ParticleProcessMaterial_cjfl8")
|
|
||||||
texture = ExtResource("3_unynm")
|
|
||||||
|
@ -379,8 +379,7 @@ animation = &"hit"
|
|||||||
autoplay = "idle"
|
autoplay = "idle"
|
||||||
|
|
||||||
[node name="chargingParticles" parent="." instance=ExtResource("10_stcqi")]
|
[node name="chargingParticles" parent="." instance=ExtResource("10_stcqi")]
|
||||||
position = Vector2(-6, 46.6)
|
position = Vector2(-6, 11)
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
emitting = false
|
|
||||||
|
|
||||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
|
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
|
||||||
|
@ -1,27 +1,708 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://davqo20o2ncpj"]
|
[gd_scene load_steps=101 format=3 uid="uid://davqo20o2ncpj"]
|
||||||
|
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yfagv"]
|
[ext_resource type="Texture2D" uid="uid://dryw0wl4n2keo" path="res://Sprites/Particles/Particles Cleaned/1_magicspell_spritesheet.png" id="1_1enuo"]
|
||||||
lifetime_randomness = 0.32
|
[ext_resource type="Script" path="res://Scripts/Animations/ChargingAnim.gd" id="2_0nus5"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bla8rw5wnahkt" path="res://Sprites/Particles/Particles Cleaned/Effect_Anima_1_437x437.png" id="2_12tb4"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cdli5isggagei" path="res://Sprites/Particles/Particles Cleaned/Effect_Worm_1_413x369.png" id="2_71agl"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://byvrltgpcb788" path="res://Sprites/Particles/Particles Cleaned/Effect_Tentacles_1_453x337.png" id="3_lamaw"]
|
||||||
|
|
||||||
|
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_4dqlh"]
|
||||||
|
particles_animation = true
|
||||||
|
particles_anim_h_frames = 9
|
||||||
|
particles_anim_v_frames = 9
|
||||||
|
particles_anim_loop = false
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_vvthl"]
|
||||||
|
max_value = 3.0
|
||||||
|
_data = [Vector2(0, 1.02198), 0.0, -0.575006, 0, 0, Vector2(0.6, 1.02198), 0.0, 0.0, 0, 0, Vector2(1, 0.593407), -2.30769, 0.0, 0, 0]
|
||||||
|
point_count = 3
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_hh7ro"]
|
||||||
|
curve = SubResource("Curve_vvthl")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_j4hsn"]
|
||||||
particle_flag_disable_z = true
|
particle_flag_disable_z = true
|
||||||
emission_shape_scale = Vector3(5, 5, 5)
|
|
||||||
emission_shape = 3
|
emission_shape = 3
|
||||||
emission_box_extents = Vector3(10, 1, 1)
|
emission_box_extents = Vector3(40, 50, 1)
|
||||||
gravity = Vector3(0, -100, 0)
|
orbit_velocity_min = -0.1
|
||||||
linear_accel_min = 100.0
|
orbit_velocity_max = 0.1
|
||||||
linear_accel_max = 100.0
|
radial_velocity_min = -50.0
|
||||||
radial_accel_max = 13.48
|
radial_velocity_max = 50.0
|
||||||
tangential_accel_max = 8.99
|
gravity = Vector3(0, -50, 0)
|
||||||
attractor_interaction_enabled = false
|
scale_over_velocity_curve = SubResource("CurveTexture_hh7ro")
|
||||||
scale_min = 10.0
|
hue_variation_min = -0.1
|
||||||
scale_max = 10.0
|
hue_variation_max = 0.1
|
||||||
color = Color(0, 0.976574, 0.976574, 1)
|
anim_speed_min = 1.0
|
||||||
|
anim_speed_max = 1.0
|
||||||
turbulence_enabled = true
|
turbulence_enabled = true
|
||||||
turbulence_noise_scale = 6.474
|
turbulence_noise_strength = 0.2
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pm4em"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(0, 0, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_sd6t5"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(437, 0, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aqp85"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(874, 0, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4x51y"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1311, 0, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_c3l5r"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1748, 0, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y850j"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(2185, 0, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cjl1a"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(0, 437, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gwn6n"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(437, 437, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ipdro"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(874, 437, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_r3asw"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1311, 437, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2303r"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1748, 437, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ndupk"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(2185, 437, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3y7g3"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(0, 874, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2mi34"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(437, 874, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_e71nj"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(874, 874, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_0ie6k"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1311, 874, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_mu6dc"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1748, 874, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bc864"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(2185, 874, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_hkebx"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(0, 1311, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aekvf"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(437, 1311, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_txplu"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(874, 1311, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_hmt31"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1311, 1311, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rsyaj"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1748, 1311, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_vsebt"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(2185, 1311, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_26cob"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(0, 1748, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_chx4e"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(437, 1748, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_t8tur"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(874, 1748, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_phln4"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1311, 1748, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qymew"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(1748, 1748, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_oi1jr"]
|
||||||
|
atlas = ExtResource("2_12tb4")
|
||||||
|
region = Rect2(2185, 1748, 437, 437)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_k4pyb"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(0, 0, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_nius0"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(453, 0, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cww6d"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(906, 0, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_x102l"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1359, 0, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ntrf4"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1812, 0, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_mhr5r"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(2265, 0, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pvxaw"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(0, 337, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lven4"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(453, 337, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_sq572"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(906, 337, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ihiad"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1359, 337, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gyv0x"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1812, 337, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_unmib"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(2265, 337, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ahas2"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(0, 674, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6wvhk"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(453, 674, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ckjm3"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(906, 674, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3giv7"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1359, 674, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ruwr4"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1812, 674, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lpnug"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(2265, 674, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_n7x01"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(0, 1011, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_yxage"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(453, 1011, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_yvhf5"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(906, 1011, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3xpjc"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1359, 1011, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ei7dr"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1812, 1011, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_e1brr"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(2265, 1011, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_v2xwh"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(0, 1348, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wi46y"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(453, 1348, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_hfbp7"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(906, 1348, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_772j0"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1359, 1348, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i3rfo"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(1812, 1348, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ci0at"]
|
||||||
|
atlas = ExtResource("3_lamaw")
|
||||||
|
region = Rect2(2265, 1348, 453, 337)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bjmba"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(0, 0, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_kugda"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(413, 0, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_0hn1v"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(826, 0, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rc52g"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1239, 0, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_yb7sb"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1652, 0, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6it24"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(2065, 0, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dcvki"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(0, 369, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_533mc"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(413, 369, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dhlxf"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(826, 369, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4aicg"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1239, 369, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4nfmi"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1652, 369, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_376o1"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(2065, 369, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ix0ce"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(0, 738, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lrfsd"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(413, 738, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_1m70v"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(826, 738, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2rnxx"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1239, 738, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rapds"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1652, 738, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_s4b85"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(2065, 738, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4dt21"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(0, 1107, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2bblx"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(413, 1107, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_vkml1"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(826, 1107, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_vk6tk"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1239, 1107, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_0jo01"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1652, 1107, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_1vcrk"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(2065, 1107, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ltu7m"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(0, 1476, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6u01c"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(413, 1476, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_b55u1"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(826, 1476, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cq4km"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1239, 1476, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_u2qga"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(1652, 1476, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_eepr7"]
|
||||||
|
atlas = ExtResource("2_71agl")
|
||||||
|
region = Rect2(2065, 1476, 413, 369)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_8ue2d"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_pm4em")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_sd6t5")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_aqp85")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_4x51y")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_c3l5r")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_y850j")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_cjl1a")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_gwn6n")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ipdro")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_r3asw")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2303r")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ndupk")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_3y7g3")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2mi34")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_e71nj")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_0ie6k")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_mu6dc")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_bc864")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_hkebx")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_aekvf")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_txplu")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_hmt31")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_rsyaj")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_vsebt")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_26cob")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_chx4e")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_t8tur")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_phln4")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qymew")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_oi1jr")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"anima",
|
||||||
|
"speed": 30.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_k4pyb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_nius0")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_cww6d")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_x102l")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ntrf4")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_mhr5r")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_pvxaw")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_lven4")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_sq572")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ihiad")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_gyv0x")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_unmib")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ahas2")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_6wvhk")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ckjm3")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_3giv7")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ruwr4")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_lpnug")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_n7x01")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_yxage")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_yvhf5")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_3xpjc")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ei7dr")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_e1brr")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_v2xwh")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_wi46y")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_hfbp7")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_772j0")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_i3rfo")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ci0at")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"tentacles",
|
||||||
|
"speed": 30.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_bjmba")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_kugda")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_0hn1v")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_rc52g")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_yb7sb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_6it24")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_dcvki")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_533mc")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_dhlxf")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_4aicg")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_4nfmi")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_376o1")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ix0ce")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_lrfsd")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_1m70v")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2rnxx")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_rapds")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_s4b85")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_4dt21")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2bblx")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_vkml1")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_vk6tk")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_0jo01")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_1vcrk")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ltu7m")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_6u01c")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_b55u1")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_cq4km")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_u2qga")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_eepr7")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"worm",
|
||||||
|
"speed": 30.0
|
||||||
|
}]
|
||||||
|
|
||||||
[node name="ChargingParticles" type="GPUParticles2D"]
|
[node name="ChargingParticles" type="GPUParticles2D"]
|
||||||
amount = 20
|
material = SubResource("CanvasItemMaterial_4dqlh")
|
||||||
process_material = SubResource("ParticleProcessMaterial_yfagv")
|
emitting = false
|
||||||
lifetime = 2.0
|
amount = 6
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_j4hsn")
|
||||||
|
texture = ExtResource("1_1enuo")
|
||||||
|
lifetime = 5.0
|
||||||
speed_scale = 2.94
|
speed_scale = 2.94
|
||||||
trail_enabled = true
|
fixed_fps = 60
|
||||||
trail_sections = 4
|
trail_sections = 4
|
||||||
|
script = ExtResource("2_0nus5")
|
||||||
|
top = Vector2(0, 95)
|
||||||
|
bottom = Vector2(0, 164)
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
|
position = Vector2(0, 164)
|
||||||
|
scale = Vector2(0.4, 0.4)
|
||||||
|
sprite_frames = SubResource("SpriteFrames_8ue2d")
|
||||||
|
animation = &"worm"
|
||||||
|
autoplay = "worm"
|
||||||
|
frame_progress = 0.331503
|
||||||
|
39
Scripts/Animations/ChargingAnim.gd
Normal file
39
Scripts/Animations/ChargingAnim.gd
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
extends GPUParticles2D
|
||||||
|
|
||||||
|
class_name ChargingAnim
|
||||||
|
|
||||||
|
@export var top: Vector2
|
||||||
|
@export var bottom: Vector2
|
||||||
|
|
||||||
|
@onready var effect: AnimatedSprite2D = $AnimatedSprite2D
|
||||||
|
|
||||||
|
var charging: bool = false
|
||||||
|
var timer: float = 1
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
if charging:
|
||||||
|
effect.position = lerp(bottom, top, timer)
|
||||||
|
else:
|
||||||
|
effect.position = lerp(top, bottom, timer)
|
||||||
|
timer = clampf(timer + delta, 0, 1)
|
||||||
|
|
||||||
|
func charge(strength: float, element: Data.Element):
|
||||||
|
charging = true
|
||||||
|
emitting = true
|
||||||
|
process_material.orbit_velocity_min = strength / 50
|
||||||
|
process_material.orbit_velocity_max = strength / 40
|
||||||
|
process_material.scale_min = strength / 5
|
||||||
|
process_material.scale_max = strength / 4
|
||||||
|
process_material.anim_speed_min = strength / 5
|
||||||
|
process_material.anim_speed_max = strength / 4
|
||||||
|
timer = 0
|
||||||
|
|
||||||
|
func disable():
|
||||||
|
charging = false
|
||||||
|
emitting = false
|
||||||
|
timer = 0
|
@ -3,9 +3,12 @@ extends "res://Scripts/animationBase.gd"
|
|||||||
@export var startPrimaryLoc: Vector2
|
@export var startPrimaryLoc: Vector2
|
||||||
@export var startSecondaryLoc: Vector2
|
@export var startSecondaryLoc: Vector2
|
||||||
@export var fullSize: float = 1
|
@export var fullSize: float = 1
|
||||||
|
@export var explodeDur: float = 0.2
|
||||||
@onready var ballofayr: AnimatedSprite2D = $Path2D/PathFollow2D/AnimatedSprite2D
|
@onready var ballofayr: AnimatedSprite2D = $Path2D/PathFollow2D/AnimatedSprite2D
|
||||||
@onready var path: PathFollow2D = $Path2D/PathFollow2D
|
@onready var path: PathFollow2D = $Path2D/PathFollow2D
|
||||||
|
@onready var particles: GPUParticles2D = $Path2D/PathFollow2D/GPUParticles2D
|
||||||
var dir: int = 1
|
var dir: int = 1
|
||||||
|
var exploding: bool = false
|
||||||
var timer: float = 0
|
var timer: float = 0
|
||||||
var size: Vector2 = Vector2(0, 0)
|
var size: Vector2 = Vector2(0, 0)
|
||||||
|
|
||||||
@ -17,17 +20,27 @@ func _ready():
|
|||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if (targetProg / finalProg < 0.3):
|
if !exploding:
|
||||||
timer = clampf(timer + delta, 0, clampf(targetProg / finalProg, 0, 0.17))
|
if (targetProg / finalProg < 0.3):
|
||||||
path.progress_ratio = timer
|
timer = clampf(timer + delta, 0, clampf(targetProg / finalProg, 0, 0.17))
|
||||||
if (targetProg / finalProg < 0.9):
|
path.progress_ratio = timer
|
||||||
var dim: float = clampf(ballofayr.scale.x + delta, 0, targetProg / finalProg)
|
if (targetProg / finalProg < 0.9):
|
||||||
ballofayr.scale = Vector2(dim * fullSize, dim * fullSize)
|
ballofayr.scale = lerp(ballofayr.scale, Vector2((targetProg / finalProg) * fullSize, (targetProg / finalProg) * fullSize), delta * 2)
|
||||||
if (targetProg / finalProg >= 0.9):
|
if (targetProg / finalProg >= 0.9):
|
||||||
timer = clampf(timer + delta, 0, targetProg / finalProg)
|
timer = clampf(timer + delta, 0, targetProg / finalProg)
|
||||||
path.progress_ratio = timer
|
path.progress_ratio = timer
|
||||||
if path.progress_ratio == 1:
|
if path.progress_ratio == 1:
|
||||||
|
explode()
|
||||||
|
else:
|
||||||
|
timer += delta
|
||||||
|
if timer > explodeDur:
|
||||||
self.free()
|
self.free()
|
||||||
|
|
||||||
|
func explode():
|
||||||
|
ballofayr.hide()
|
||||||
|
particles.emitting = true
|
||||||
|
exploding = true
|
||||||
|
timer = 0
|
||||||
|
|
||||||
func castFailed():
|
func castFailed():
|
||||||
pass
|
explode()
|
||||||
|
@ -23,7 +23,7 @@ func _process(delta):
|
|||||||
spellIndex = i
|
spellIndex = i
|
||||||
castIndicator.show()
|
castIndicator.show()
|
||||||
castIndicator.setDirs(spell.castCombo[0], spell.castCombo[1])
|
castIndicator.setDirs(spell.castCombo[0], spell.castCombo[1])
|
||||||
avatar.particleSystem.emitting = true
|
avatar.particleSystem.charge(spell.castCombo.size(), spell.element)
|
||||||
if spell.animation != null:
|
if spell.animation != null:
|
||||||
if !data.animations.has(spell.animation):
|
if !data.animations.has(spell.animation):
|
||||||
print("Loading Animation")
|
print("Loading Animation")
|
||||||
@ -46,7 +46,7 @@ func _process(delta):
|
|||||||
|
|
||||||
if spell.castProgress == spell.castCombo.size():
|
if spell.castProgress == spell.castCombo.size():
|
||||||
casting = false
|
casting = false
|
||||||
avatar.particleSystem.emitting = false
|
avatar.particleSystem.disable()
|
||||||
spell.castProgress = 0
|
spell.castProgress = 0
|
||||||
avatar.renderer.play("attack1")
|
avatar.renderer.play("attack1")
|
||||||
data.spellbook.cooldowns[spellIndex] = spell.cooldown
|
data.spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||||
@ -55,7 +55,7 @@ func _process(delta):
|
|||||||
avatar.alterHealth(-spell.backfireStrength, true)
|
avatar.alterHealth(-spell.backfireStrength, true)
|
||||||
casting = false
|
casting = false
|
||||||
anim.castFailed()
|
anim.castFailed()
|
||||||
avatar.particleSystem.emitting = false
|
avatar.particleSystem.disable()
|
||||||
spell.castProgress = 0
|
spell.castProgress = 0
|
||||||
data.spellbook.cooldowns[spellIndex] = spell.cooldown * (float(spell.castProgress) / float(spell.castCombo.size()))
|
data.spellbook.cooldowns[spellIndex] = spell.cooldown * (float(spell.castProgress) / float(spell.castCombo.size()))
|
||||||
castIndicator.hide()
|
castIndicator.hide()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user