diff --git a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs index 67a7a31..350cc34 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs @@ -1,3 +1,4 @@ +using System.Collections; using Godot; /// @@ -78,6 +79,16 @@ { ShowOutline = true; OutlineColor = new Color(1, 0, 0); + StartCoroutine(BorderFlashes()); + } + } + + private IEnumerator BorderFlashes() + { + while (true) + { + ShowOutline = !ShowOutline; + yield return new WaitForSeconds(0.12f); } } @@ -134,4 +145,9 @@ Destroy(); } } + + protected override void OnDestroy() + { + StopAllCoroutine(); + } } \ No newline at end of file