The Tiffy pilot is no different from the soldier in Horseguards, or any armed guard or police anywhere.
Without going in to RoE, it was normal to shout a warning and issue orders.
In the case in Canada, where the gun man makes no threat but goes straight into attack then I imagine immediate response, no warning, would be both necessary and permitted.
I know there must be other issues and considerations but . . .