Добавлен Павший

This commit is contained in:
Евгений Титаренко 2023-08-19 09:30:55 +03:00
parent 7c9a71504c
commit 429fe9b62f
12 changed files with 404 additions and 9 deletions

View file

@ -58,13 +58,19 @@ public partial class Spikes : Area2D
private void _OnEntered(Node2D body)
{
if (body is not Player player)
return;
if (_state is State.Waiting)
return;
player.Kill(this);
switch (body)
{
case Wretched wretched:
wretched.Kill(this);
break;
case Player player:
player.Kill(this);
break;
default:
return;
}
}