It depends on the code, but…
Normally the “delegate” in such circumstances e.g.
if ([delegate respondsToSelector:
is a property of the class and is normally set by the parent or controlling class after the class is initiated.
// in the class that creates the monsters e.g. the controller or main clas
myMonester = new Monster();
myMonster.delegate = this; // this would be = self in Objective-C
// In the Monster class
if (typeof this.delegate.shootMissile == ‘function’)