kinugasa.object
クラス AnimationSprite

java.lang.Object
  上位を拡張 kinugasa.object.Sprite
      上位を拡張 kinugasa.object.BasicSprite
          上位を拡張 kinugasa.object.ImageSprite
              上位を拡張 kinugasa.object.AnimationSprite
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Sprite>, Controllable, Drawable, Shapeable

public class AnimationSprite
extends ImageSprite

Kinugasa : AnimationSprite : .

バージョン:
1.0.0 - 2013/01/14_20:49:20
作成者:
Dra0211
関連項目:
直列化された形式

フィールドの概要
private  Animation animation
           
private  boolean imageUpdate
           
private static long serialVersionUID
           
 
コンストラクタの概要
AnimationSprite()
          新しいアニメーションスプライトを作成します.
AnimationSprite(float w, float h, Animation animation, ImagePainter dm)
          新しいアニメーションスプライトを作成します.
AnimationSprite(float x, float y, float w, float h)
          新しいアニメーションスプライトを作成します.
AnimationSprite(float x, float y, float w, float h, Animation animation)
          新しいアニメーションスプライトを作成します.
AnimationSprite(float x, float y, float w, float h, Animation animation, ImagePainter model)
          新しいアニメーションスプライトを作成します.
AnimationSprite(float x, float y, float w, float h, VectorF vector, MovingModel mm, Animation animation, ImagePainter dm)
          新しいアニメーションスプライトを作成します.
AnimationSprite(float w, float h, VectorF vector, MovingModel mm, Animation animation, ImagePainter dm)
          新しいアニメーションスプライトを作成します.
 
メソッドの概要
 AnimationSprite clone()
          このスプライトの複製を作成します.
 void draw(java.awt.Graphics2D g)
          スプライトを描画します.
 Animation getAnimation()
           
 void imageUpdate()
          アニメーションを更新し、最新の画像を適用します.
 boolean isImageUpdate()
           
 void setAnimation(Animation animation)
           
 void setImageUpdate(boolean imageUpdate)
           
 java.lang.String toString()
          スプライトの文字列表記を取得します.
 
クラス kinugasa.object.ImageSprite から継承されたメソッド
getDrawingModel, getImage, getImageHeight, getImageWidth, getSerializableImage, setDrawingModel, setImage, setImage
 
クラス kinugasa.object.BasicSprite から継承されたメソッド
getAngle, getMovingModel, getMovingModel, getNextCenter, getNextLocation, getSpeed, getVector, move, move, move, move, setAngle, setMovingModel, setSpeed, setVector
 
クラス kinugasa.object.Sprite から継承されたメソッド
compareTo, contains, getBounds, getCenter, getCenterX, getCenterY, getHeight, getHitBounds, getLocation, getPersonalCenter, getPersonalCenterX, getPersonalCenterY, getSize, getStatus, getWidth, getX, getY, getZ, isExist, isVisible, setBounds, setBounds, setBounds, setExist, setHeight, setLocation, setLocation, setSize, setSize, setStatus, setVisible, setWidth, setX, setY, setZ, update, updateCenter, updatePersonalCenter
 
クラス java.lang.Object から継承されたメソッド
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

serialVersionUID

private static final long serialVersionUID
関連項目:
定数フィールド値

animation

private Animation animation

imageUpdate

private boolean imageUpdate
コンストラクタの詳細

AnimationSprite

public AnimationSprite()
新しいアニメーションスプライトを作成します. このコンストラクタでは、画像がnullに、描画モデルがIMAGE_BOUNDS_XYに設定されます。


AnimationSprite

public AnimationSprite(float x,
                       float y,
                       float w,
                       float h)
新しいアニメーションスプライトを作成します. このコンストラクタでは、画像がnullに、 描画モデルがIMAGE_BOUNDS_XYに設定されます。

パラメータ:
x - スプライトのX座標を指定します。
y - スプライトのY座標を指定します。
w - スプライトの幅を指定します。
h - スプライトの高さを指定します。

AnimationSprite

public AnimationSprite(float x,
                       float y,
                       float w,
                       float h,
                       Animation animation)
新しいアニメーションスプライトを作成します. このコンストラクタでは、 描画モデルはIMAGE_BOUNDS_XYに設定されます。

パラメータ:
x - スプライトのX座標を指定します。
y - スプライトのY座標を指定します。
w - スプライトの幅を指定します。
h - スプライトの高さを指定します。
animation - 表示するアニメーションを指定します。

AnimationSprite

public AnimationSprite(float x,
                       float y,
                       float w,
                       float h,
                       Animation animation,
                       ImagePainter model)
新しいアニメーションスプライトを作成します.

パラメータ:
x - スプライトのX座標を指定します。
y - スプライトのY座標を指定します。
w - スプライトの幅を指定します。
h - スプライトの高さを指定します。
animation - 表示する画像を指定します。
model - 描画方法を指定します。

AnimationSprite

public AnimationSprite(float x,
                       float y,
                       float w,
                       float h,
                       VectorF vector,
                       MovingModel mm,
                       Animation animation,
                       ImagePainter dm)
新しいアニメーションスプライトを作成します.

パラメータ:
x - スプライトのX座標を指定します。
y - スプライトのY座標を指定します。
w - スプライトの幅を指定します。
h - スプライトの高さを指定します。
vector -
animation -
mm - 移動モデルを指定します。
dm - 描画モデルを指定します。

AnimationSprite

public AnimationSprite(float w,
                       float h,
                       VectorF vector,
                       MovingModel mm,
                       Animation animation,
                       ImagePainter dm)
新しいアニメーションスプライトを作成します. このコンストラクタはクローニング用のマスタデータを作成する場合に有用です。

パラメータ:
w - スプライトの幅を指定します。
h - スプライトの高さを指定します。
vector -
animation -
mm - 移動モデルを指定します。
dm - 描画モデルを指定します。

AnimationSprite

public AnimationSprite(float w,
                       float h,
                       Animation animation,
                       ImagePainter dm)
新しいアニメーションスプライトを作成します. このコンストラクタはクローニング用のマスタデータを作成する場合に有用です。
特にメッセージウインドウのアイコンなど座標を後から設定し、その後移動することのない スプライトに効果的です。

パラメータ:
w - スプライトの幅を指定します。
h - スプライトの高さを指定します。
animation -
dm - 描画モデルを指定します。
メソッドの詳細

getAnimation

public Animation getAnimation()

setAnimation

public void setAnimation(Animation animation)

setImageUpdate

public void setImageUpdate(boolean imageUpdate)

isImageUpdate

public boolean isImageUpdate()

imageUpdate

public void imageUpdate()
アニメーションを更新し、最新の画像を適用します. このメソッドは、drawメソッドによる描画の完了後、自動的にコールされます。
設定されているアニメーションがnullの場合は何も行いません。


draw

public void draw(java.awt.Graphics2D g)
クラス BasicSprite の記述:
スプライトを描画します. visibleまたはexistがfalseのとき、描画してはなりません.

定義:
インタフェース Drawable 内の draw
オーバーライド:
クラス ImageSprite 内の draw
パラメータ:
g - グラフィックスコンテキスト.

clone

public AnimationSprite clone()
クラス BasicSprite の記述:
このスプライトの複製を作成します. このメソッドでは、全てのフィールドをクローニングします.
このメソッドはサブクラスで適切にオーバーライドしてください.

オーバーライド:
クラス ImageSprite 内の clone
戻り値:
このスプライトと同じ設定の新しいインスタンス.

toString

public java.lang.String toString()
クラス BasicSprite の記述:
スプライトの文字列表記を取得します. 文字列にはスプライトのフィールド情報が含まれています.これらの値はすべてアクセサを通して取得可能です.

オーバーライド:
クラス ImageSprite 内の toString
戻り値:
スプライトの情報.