#BlueJ class context comment0.params= comment0.target=void\ act() comment1.params=the_level comment1.target=Spaceship(int) comment10.params=new_level comment10.target=void\ setLevel(int) comment11.params= comment11.target=int\ getLevel() comment12.params= comment12.target=void\ fire() comment12.text=\n\ Try\ to\ fire\ (all)\ the\ guns.\ That\ is,\ call\ each\ gun's\ missile()\ method\ and\ check\ if\ something\ came\ out\ yet.\n\ If\ yes,\ place\ it\ into\ the\ world.\n comment13.params=n_hitpoints comment13.target=void\ addHitpoints(int) comment14.params=n_hitpoints comment14.target=void\ removeHitpoints(int) comment15.params= comment15.target=int\ getHitpoints() comment16.params=hit comment16.target=void\ setHitpoints(int) comment17.params= comment17.target=int\ getMaxHitpoints() comment18.params=max comment18.target=void\ setMaxHitpoints(int) comment19.params= comment19.target=void\ beforeDestruction() comment19.text=\n\ This\ method\ is\ called\ right\ before\ the\ spaceship\ is\ destroyed\ by\ (and\ only\ by)\ lack\ of\ hitpoints.\n\ Empty\ here,\ to\ be\ overridden\ in\ subclasses\ that\ e.\ g.\ want\ to\ leave\ power-ups\ behind.\n comment2.params=position\ new_gun comment2.target=void\ addGun(int,\ Gun) comment2.text=\n\ Add\ a\ gun\ in\ the\ given\ position.\ Doesn't\ check\ if\ position\ exceeds\ array\ bounds.\ This\ is\ a\ feature.\n\ (Seriously\:\ The\ check\ wasn't\ implemented\ because\ that\ way\ programming\ mistakes\ in\ MoreGuns\ etc.\ became\n\ obvious\ more\ quickly.)\n\ \n\ @see\ MoreGuns\n comment20.params=m comment20.target=boolean\ hit(Missile) comment20.text=\n\ If\ the\ missile\ was\ shot\ by\ an\ enemy,\ subtract\ hitpoints.\n comment21.params= comment21.target=void\ setupImages() comment21.text=\n\ Sort-of\ abstract\ method\ available\ for\ overriddance\ [sic].\ Subclasses\ can\ implement\ this\ to\ set\ their\ sprite\n\ (back)\ to\ its\ default\ value.\ It's\ called\ whenever\ a\ reset\ to\ the\ default\ sprite\ is\ needed,\ e.\ g.\ after\n\ the\ blinking\ animation.\n\ \n\ @see\ \#doBlink()\n comment22.params=the_blink_file comment22.target=void\ setBlinkFile(java.lang.String) comment23.params= comment23.target=java.lang.String\ getBlinkFile() comment24.params= comment24.target=void\ doBlink() comment24.text=\n\ Do\ the\ blinking\ animation.\ This\ is\ called\ whenever\ the\ ship\ has\ hitpoints\ subtracted.\ It\ evaluates\ and\n\ changes\ the\ "blink"\ variable,\ and\ changes\ sprites\ if\ necessary.\n comment25.params=max comment25.target=void\ setMaxBlink(int) comment26.params= comment26.target=int\ getMaxBlink() comment3.params=position comment3.target=void\ removeGun(int) comment3.text=\n\ Remove\ the\ gun\ in\ the\ given\ position.\ Doesn't\ check\ if\ position\ exceeds\ array\ bounds.\n\ \n\ @see\ \#addGun()\n comment4.params= comment4.target=int\ getNumberOfGuns() comment5.params= comment5.target=void\ reorderGuns() comment5.text=\n\ Set\ the\ guns'\ dx\ values\ so\ that\ the\ missiles\ are\ launched\ from\ appear\ in\ an\ neat,\ aligned\ fashion.\n\ That\ is,\ make\ them\ launch\ from\ positions\ that\ are\ GUN_DISTANCE\ pixels\ apart\ from\ each\ other,\ and\n\ aligned\ to\ the\ center\ of\ the\ spaceship.\n comment6.params=x\ max_angle comment6.target=double\ angle(double,\ double) comment6.text=\n\ Return\ an\ angle\ that\ lies\ between\ -max_angle\ and\ max_angle\ for\ x\ between\ 0\ and\ 1\n\ \n\ @param\ x\:\ number\ between\ 0.0\ and\ 1.0\n comment7.params=angled comment7.target=void\ setAngledGuns(boolean) comment7.text=\n\ Sets\ the\ ship\ to\ shoot\ straight\ or\ widespread\ (aka\ angled).\ Recalculate\ the\ guns'\ speed\ vectors\ based\n\ on\ that\ value.\n comment8.params=new_side comment8.target=void\ setSide(int) comment9.params= comment9.target=int\ getSide() numComments=27