クラス Character

java.lang.Object
  拡張Character

public class Character
extends java.lang.Object

キャラクタークラス


フィールドの概要
private  boolean flag
          キャラの生成状態
private  com.nttdocomo.ui.Image image
          キャラ画像
private  int NUMBER_MAX
          カyラ画像オブジェ番号の最小値
private  int NUMBER_MIN
          キャラ画像オブジェ番号の最小値
private  int SPEED_MAX
          キャラの最高移動速度
private  int speed_x
          キャラの移動速度X座標
private  int speed_y
          キャラの移動速度Y座標
private  int x
          キャラの位置X座標
private  int y
          キャラの位置Y座標
 
コンストラクタの概要
(パッケージプライベート) Character()
           
 
メソッドの概要
 void createNomal(int x, int y)
          ノーマルキャラの生成
 void createSpesial(int x, int y)
          スペシャルキャラの生成
 void dispose()
          キャラの破棄
 boolean getFlag()
          キャラの生成状態の取得
 com.nttdocomo.ui.Image getImage()
          キャラ画像の取得
 int getX()
          キャラの位置X座標の取得
 int getY()
          キャラの位置Y座標の取得
 void move()
          キャラの移動
 void setDirectionX(boolean direction)
          キャラの移動方向X座標の設定
 void setDirectionY(boolean direction)
          キャラの移動方向Y座標の設定
private  int setSpeed()
          キャラの移動速度の生成
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

x

private int x
キャラの位置X座標


y

private int y
キャラの位置Y座標


speed_x

private int speed_x
キャラの移動速度X座標


speed_y

private int speed_y
キャラの移動速度Y座標


flag

private boolean flag
キャラの生成状態


image

private com.nttdocomo.ui.Image image
キャラ画像


NUMBER_MIN

private final int NUMBER_MIN
キャラ画像オブジェ番号の最小値

関連項目:
定数フィールド値

NUMBER_MAX

private final int NUMBER_MAX
カyラ画像オブジェ番号の最小値

関連項目:
定数フィールド値

SPEED_MAX

private final int SPEED_MAX
キャラの最高移動速度

関連項目:
定数フィールド値
コンストラクタの詳細

Character

Character()
メソッドの詳細

setSpeed

private int setSpeed()
キャラの移動速度の生成

戻り値:
キャラの移動速度 int型

setDirectionX

public void setDirectionX(boolean direction)
キャラの移動方向X座標の設定

パラメータ:
direction - 移動方向 正 true, 負 false

setDirectionY

public void setDirectionY(boolean direction)
キャラの移動方向Y座標の設定

パラメータ:
direction - 移動方向 正 true, 負 false

createNomal

public void createNomal(int x,
                        int y)
ノーマルキャラの生成

パラメータ:
x - キャラの位置X座標
y - キャラの位置Y座標

createSpesial

public void createSpesial(int x,
                          int y)
スペシャルキャラの生成

パラメータ:
x - キャラの位置X座標
y - キャラの位置Y座標

move

public void move()
キャラの移動


dispose

public void dispose()
キャラの破棄


getX

public int getX()
キャラの位置X座標の取得

戻り値:
キャラの位置 int型

getY

public int getY()
キャラの位置Y座標の取得

戻り値:
キャラの位置 int型

getFlag

public boolean getFlag()
キャラの生成状態の取得

戻り値:
生成状態 true, 破棄状態 failse

getImage

public com.nttdocomo.ui.Image getImage()
キャラ画像の取得

戻り値:
キャラ画像 Image型