Files
GameJam2023/Scripts/Level3.cs
2023-09-06 01:32:54 -07:00

24 lines
367 B
C#

using Godot;
public partial class Level3 : Level
{
private int _numberOfHits = 3;
private MeshInstance3D _door;
public override void _Ready()
{
base._Ready();
_door = GetNode<MeshInstance3D>("Door");
}
private void OnDoorHit(Node3D node)
{
_numberOfHits--;
GD.Print(_numberOfHits);
if (_numberOfHits == 0)
{
_door.QueueFree();
}
}
}