Create a new scene with Node2D as root
Add a CollisionShape2D as child
Select Sprite2D of TopPipe
Set texture to pipe-green.png
Set rotation to 180 degrees
Select the CollisionShape
Add a new RectangleShape2D
Select Sprite2D of BottomPipe
Set texture to pipe-green.png
Select CollisionShape of BottomPipe
Select the Pipes root node
Add a new Area2D as child
Add a CollisionShape2D as child
Add a new RectangleShape2D
Add a VisibleOnScreenNotifier2D node
So we can delete pipes which
Add a variable for pipe scroll speed
Add a function to set the speed
At which the pipes scroll
Constantly updating their x position
Create a function for scoring points
Code it to call the add point function in the Signal Bus
signal of ScoreArea to on point scored
Connect the body entered signal of TopPipe & BottomPipe
Code it to emit the bird entered signal
Connect the screen exited
signal of VisibleOnScreenNotifier2D
Code it to delete the off-screen pipes
Create a new scene with Node as root
Add a Timer node as child
Add a new Script to PipeSpawner
Create a reference to the pipes scene
Create export variables for
Create a ready variable for Timer
Create a function to spawn a pipe pair
Instantiate the pipe scene
Add the pipes to the scene tree
Get the dimensions of the screen
Position the pipes at the right edge
Position the pipes vertically
At a random position between min and max
Set negative pipe speed to move left
Create a function to stop spawning pipes
For each pipe in the scene tree
Create a function to spawn pipes
All this does is start the timer
Connect the timeout signal
To the spawn pipe function