Door hit
This commit is contained in:
@@ -2,7 +2,11 @@ using Godot;
|
||||
|
||||
public partial class Level3 : Level
|
||||
{
|
||||
private int _numberOfHits = 3;
|
||||
[Export]
|
||||
public AnimationPlayer AnimationPlayer { get; set; }
|
||||
[Export]
|
||||
private int _numberOfHits = 10;
|
||||
|
||||
private MeshInstance3D _door;
|
||||
|
||||
public override void _Ready()
|
||||
@@ -15,7 +19,9 @@ public partial class Level3 : Level
|
||||
{
|
||||
_numberOfHits--;
|
||||
GD.Print(_numberOfHits);
|
||||
if (_numberOfHits == 0)
|
||||
AnimationPlayer.Play("HitFlash");
|
||||
|
||||
if (_numberOfHits == 0)
|
||||
{
|
||||
_door.QueueFree();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user