Добавлен Павший
This commit is contained in:
parent
7c9a71504c
commit
429fe9b62f
12 changed files with 404 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue