This C# script controls enemy behavior in a 2D game. It finds the player's cannon controller on start. When the enemy collides with a cannonball, it instantiates a fire explosion at the enemy's position, disables the enemy's sprite renderer and box collider to remove it from the scene.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
27 views1 page
Cannon Robot Script
This C# script controls enemy behavior in a 2D game. It finds the player's cannon controller on start. When the enemy collides with a cannonball, it instantiates a fire explosion at the enemy's position, disables the enemy's sprite renderer and box collider to remove it from the scene.