When Pacman eats a Power Pellet for a short time he is able to eat the ghosts
Create a new scene with Area2D as root
Set the Sprite2D texture to:
Optional: Turn off centre offset
This can make it easier to place pellets
Set the CollisionShape to a
New Circile Shape, set the
Add a new Script to the PowerPellet
Add a custom signal to alert any
Listeners that we were eaten
Add a function for when the pellet is eaten
Select the PowerPellet node
Connect the body entered signal
Code the body entered function to
Call the eat function if the body is
Return to the Main level Scene
Add a new Node as a child
Rename it to PowerPellets
To each corner of the screen
Set all ghosts to scared mode
When a power pellet is eaten
Update the Ready function to
Connect the power_pellet_eaten signal