Tap the enemy to shoot. If you let too many enemies break into your castle, you will lose! The strong enemies have an extra life. I used sensors (blue) to guide the enemies on the pathway. You can try it out too! The boss enemy (purple) has 9 extra lives and is very slow.
Credits to @OrangeBlok