The newest WIP presents enemy Wizard. It patrols on platform and casts spell when detects palyer.
Most of the code used for Wizard is reuse of previously written code for other enemies. Start of spell casting is part of Wizard gameobject, but when the spell is ready to move, it is changed into missile and missile manager takes control over it.
On image above, you can see player detector in front of the Wizard.