Creating the Enemy Scene & Variants


1. Scene Setup & Hierarchy

-Click the + tab at the top of the editor to create a New Scene.

-Click Other Node, search for Area2D, and select it as the root node.

-Rename the root Area2D node to enemy.

-Add a CollisionShape2D as a child of enemy.

-Add a Node2D as a child of enemy and rename it to enemy_type.

-With enemy_type selected, add four Sprite2D child nodes and name them:

2. Node Inspector Settings



3. Adding the Node Group