【正文】
。 (17, 8)。 Initialize()。 } catch(IOException ioe){ (GoldHook can39。t be loaded.)。 } } public void Initialize(){ getHookSprite().setVisible(true)。 getHookSprite().setFrame(0)。 getHookSprite().setTransform()。 nowSpeed = SPEED。 X = INIX。 Y = INIY。 currentImage = 0。 ((int)X,(int)Y)。 } public int getnowSpeed(){ return nowSpeed。 } public int getX(){ return (int)X。 } public int getY(){ return (int)Y。 } public void setXY(int x, int y){ X = x。 Y = y。 } public void setnowSpeed(int nowspeed){ nowSpeed = nowspeed。 } public void setCurrentImage( int currentimage ){ currentImage = currentimage。 } public Image getSource(){ return Source。 } public Sprite getHookSprite(){ return HookSprite。 } public void extReSetXY( boolean isLeft ){ if ( () == 8 ){ Y = Y+nowSpeed。 } else{ if ( isLeft == true ){ X = XnowSpeed*TRIANGLE[()]。 Y = Y+nowSpeed*TRIANGLE[()1]。 } else{ X = X+nowSpeed*TRIANGLE[()1]。 Y = Y+nowSpeed*TRIANGLE[()]。 } } ((int)X, (int)Y)。 } public void backReSetXY( boolean isLeft ){ if ( () == 8 ){ Y = YnowSpeed。 } else{ if ( isLeft == true ){ X = X+nowSpeed*TRIANGLE[()]。 Y = YnowSpeed*TRIANGLE[()1]。 } else{ X = XnowSpeed*TRIANGLE[()1]。 Y = YnowSpeed*TRIANGLE[()]。 } } ((int)X, (int)Y)。 }}:import 。import 。import 。public class Gold extends Target { private static final int PERVALUE = 100。 public Gold(){ super()。 } public Gold( int x, int y, int size ) { String filename = /G + (size) + .png。 try{ (x, y, size, new Sprite((filename)) )。 }catch( IOException ioe ){ (Can39。t Load Gold file.)。 } } public int getRelValue(){ return getSize()*PERVALUE。 }