To modify the rocket
class, we will follow the ensuing steps:
rocketClass.monkey
file. Update
method and add a CreateExplosion
call there. The parameters are the current X and Y positions of the rocket.If cy < ty Then CreateExplosion(Self.cx, Selfish) rockets.Remove(Self) Endif
We have modified the rocket
class to create a new explosion once the rocket reaches its target position.