モバイルの素

クラス Ship

java.lang.Object
  上位を拡張 BaseObj
      上位を拡張 Ship

public class Ship
extends BaseObj

自機クラス


メソッドの概要
 void init(int ix, int iy)
          初期化
 void paint(Graphics g)
          描画処理
 int reducePower(int percent)
          体力減処理
 void setColorByShipPower(Graphics g)
          残体力によって自機の色を変化させる(未使用)
 
クラス BaseObj から継承されたメソッド
dirto, distanceto, getdir, getspeed, getx, gety, hittest, init, proceed, rotate, setxy
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

init

public void init(int ix,
                 int iy)
初期化

パラメータ:
ix - 開始X位置
iy - 開始Y位置

reducePower

public int reducePower(int percent)
体力減処理

パラメータ:
percent - 減算量
戻り値:
減算結果

setColorByShipPower

public void setColorByShipPower(Graphics g)
残体力によって自機の色を変化させる(未使用)

パラメータ:
g - 描画対象オブジェクト

paint

public void paint(Graphics g)
描画処理

パラメータ:
g - 描画対象オブジェクト

モバイルの素