Updated the dodge_the_creeps demo to include the "removing the creeps" part

This commit is contained in:
Amara M. Angel
2020-04-03 18:35:35 +02:00
parent 57baf0a1b5
commit ee388dd5df
4 changed files with 13 additions and 0 deletions

View File

@@ -84,5 +84,7 @@ public class Main : Node
// Choose the velocity.
mobInstance.SetLinearVelocity(new Vector2(RandRange(150f, 250f), 0).Rotated(direction));
GetNode("HUD").Connect("StartGame", mobInstance, "OnStartGame");
}
}

View File

@@ -23,4 +23,9 @@ public class Mob : RigidBody2D
{
QueueFree();
}
public void OnStartGame()
{
QueueFree();
}
}