mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
Updated the dodge_the_creeps demo to include the "removing the creeps" part
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,9 @@ public class Mob : RigidBody2D
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
public void OnStartGame()
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user