Collisions and cooldowns

This commit is contained in:
MaddoScientisto 2024-08-18 11:33:17 +02:00
commit 6ff1ab76ed
9 changed files with 105 additions and 3848 deletions

View file

@ -70,7 +70,12 @@ public partial class Bullet : Area2D
private void _on_area_entered(Area2D area)
{
// Replace with function body.
if (area.IsInGroup("Solid"))
{
QueueFree();
return;
}
if (area.IsInGroup("Destroyable") && area is IDestructible destructible)
{
//Debug.WriteLine("Collision with destroyable object area");