From df2759ffb483ae87c1765e38049109bc7df51773 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Tue, 10 Oct 2023 16:27:06 -0400 Subject: [PATCH 1/2] =?UTF-8?q?l=C3=A0=20l=C3=A0=20l=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scenes/enemy.tscn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Scenes/enemy.tscn b/Scenes/enemy.tscn index 4f22fec..aafe1b3 100644 --- a/Scenes/enemy.tscn +++ b/Scenes/enemy.tscn @@ -383,6 +383,21 @@ autoplay = "Idle" frame_progress = 0.487368 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="."] autostart = true @@ -416,6 +431,7 @@ collision_layer = 2 collision_mask = 2 [node name="Attack1CollisionR" type="CollisionShape2D" parent="AttackArea"] +visible = false position = Vector2(3, -7) rotation = 1.5708 skew = 0.223402 @@ -423,6 +439,7 @@ shape = SubResource("CapsuleShape2D_qykhm") debug_color = Color(0.956863, 0.203922, 0, 0.419608) [node name="Attack1CollisionL" type="CollisionShape2D" parent="AttackArea"] +visible = false position = Vector2(-3, -7) rotation = 1.5708 skew = -0.169297 @@ -430,6 +447,7 @@ shape = SubResource("CapsuleShape2D_qykhm") debug_color = Color(0.956863, 0.203922, 0, 0.419608) [node name="Attack2CollisionR" type="CollisionShape2D" parent="AttackArea"] +visible = false position = Vector2(25, -7) rotation = 1.5708 skew = 0.0837758 @@ -437,6 +455,7 @@ shape = SubResource("CapsuleShape2D_qykhm") debug_color = Color(0.956863, 0.203922, 0, 0.419608) [node name="Attack2CollisionL" type="CollisionShape2D" parent="AttackArea"] +visible = false position = Vector2(-25, -7) rotation = 1.5708 skew = -0.0837758 From bef6ae8f4efcd71446151cd0fe717fd52b0c1622 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Tue, 10 Oct 2023 16:32:28 -0400 Subject: [PATCH 2/2] Update Enemy.gd --- Scripts/Enemy.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Scripts/Enemy.gd b/Scripts/Enemy.gd index 5285d32..3c05985 100644 --- a/Scripts/Enemy.gd +++ b/Scripts/Enemy.gd @@ -41,6 +41,8 @@ func _process(delta): # AI STUFF #velocity = processAI(objects,velocity,delta) + if !hitanim.is_emitting(): + anim.modulate(Color(0,0,0,1)) move_and_slide() @@ -88,6 +90,7 @@ func receive_damage(dmg): pass hp -= dmg hitanim.restart() + anim.modulate(Color(0,0,0,.5)) if hp < 0: velocity = Vector2(0,0) setAnimState("Die")