This commit is contained in:
David Belisle 2023-10-10 16:40:04 -04:00
commit f257c1f88d
2 changed files with 22 additions and 0 deletions

View File

@ -383,6 +383,21 @@ autoplay = "Idle"
frame_progress = 0.487368 frame_progress = 0.487368
flip_h = true flip_h = true
[node name="Hit" type="CPUParticles2D" parent="."]
emitting = false
amount = 12
lifetime = 0.2
one_shot = true
explosiveness = 0.75
randomness = 0.72
emission_shape = 1
emission_sphere_radius = 5.53
initial_velocity_min = 12.0
initial_velocity_max = 12.0
angular_velocity_min = 50.0
angular_velocity_max = 50.0
color = Color(0.623529, 0, 0, 0.729412)
[node name="Atk_cooldown" type="Timer" parent="."] [node name="Atk_cooldown" type="Timer" parent="."]
autostart = true autostart = true
@ -416,6 +431,7 @@ collision_layer = 2
collision_mask = 2 collision_mask = 2
[node name="Attack1CollisionR" type="CollisionShape2D" parent="AttackArea"] [node name="Attack1CollisionR" type="CollisionShape2D" parent="AttackArea"]
visible = false
position = Vector2(3, -7) position = Vector2(3, -7)
rotation = 1.5708 rotation = 1.5708
skew = 0.223402 skew = 0.223402
@ -423,6 +439,7 @@ shape = SubResource("CapsuleShape2D_qykhm")
debug_color = Color(0.956863, 0.203922, 0, 0.419608) debug_color = Color(0.956863, 0.203922, 0, 0.419608)
[node name="Attack1CollisionL" type="CollisionShape2D" parent="AttackArea"] [node name="Attack1CollisionL" type="CollisionShape2D" parent="AttackArea"]
visible = false
position = Vector2(-3, -7) position = Vector2(-3, -7)
rotation = 1.5708 rotation = 1.5708
skew = -0.169297 skew = -0.169297
@ -430,6 +447,7 @@ shape = SubResource("CapsuleShape2D_qykhm")
debug_color = Color(0.956863, 0.203922, 0, 0.419608) debug_color = Color(0.956863, 0.203922, 0, 0.419608)
[node name="Attack2CollisionR" type="CollisionShape2D" parent="AttackArea"] [node name="Attack2CollisionR" type="CollisionShape2D" parent="AttackArea"]
visible = false
position = Vector2(25, -7) position = Vector2(25, -7)
rotation = 1.5708 rotation = 1.5708
skew = 0.0837758 skew = 0.0837758
@ -437,6 +455,7 @@ shape = SubResource("CapsuleShape2D_qykhm")
debug_color = Color(0.956863, 0.203922, 0, 0.419608) debug_color = Color(0.956863, 0.203922, 0, 0.419608)
[node name="Attack2CollisionL" type="CollisionShape2D" parent="AttackArea"] [node name="Attack2CollisionL" type="CollisionShape2D" parent="AttackArea"]
visible = false
position = Vector2(-25, -7) position = Vector2(-25, -7)
rotation = 1.5708 rotation = 1.5708
skew = -0.0837758 skew = -0.0837758

View File

@ -41,6 +41,8 @@ func _process(delta):
# AI STUFF # AI STUFF
#velocity = processAI(objects,velocity,delta) #velocity = processAI(objects,velocity,delta)
if !hitanim.is_emitting():
anim.modulate(Color(0,0,0,1))
move_and_slide() move_and_slide()
@ -88,6 +90,7 @@ func receive_damage(dmg):
pass pass
hp -= dmg hp -= dmg
hitanim.restart() hitanim.restart()
anim.modulate(Color(0,0,0,.5))
if hp < 0: if hp < 0:
velocity = Vector2(0,0) velocity = Vector2(0,0)
setAnimState("Die") setAnimState("Die")