pakiet_gra_platformowa
Class Bohater
java.lang.Object
javax.microedition.lcdui.game.Layer
javax.microedition.lcdui.game.Sprite
pakiet_gra_platformowa.ObiektRuchomy
pakiet_gra_platformowa.Bohater
- All Implemented Interfaces:
- WarunkiStrzelania
public class Bohater
- extends ObiektRuchomy
- implements WarunkiStrzelania
Fields inherited from class javax.microedition.lcdui.game.Sprite |
TRANS_MIRROR, TRANS_MIRROR_ROT180, TRANS_MIRROR_ROT270, TRANS_MIRROR_ROT90, TRANS_NONE, TRANS_ROT180, TRANS_ROT270, TRANS_ROT90 |
Constructor Summary |
Bohater(javax.microedition.lcdui.Image _obraz,
int _nr_planszy_x,
int _nr_planszy_y,
javax.microedition.lcdui.game.TiledLayer _tekstura,
Plotno _plotno)
|
Methods inherited from class javax.microedition.lcdui.game.Sprite |
collidesWith, collidesWith, collidesWith, defineCollisionRectangle, defineReferencePixel, getFrame, getFrameSequenceLength, getRawFrameCount, getRefPixelX, getRefPixelY, nextFrame, paint, prevFrame, setFrame, setFrameSequence, setImage, setRefPixelPosition, setTransform |
Methods inherited from class javax.microedition.lcdui.game.Layer |
getHeight, getWidth, getX, getY, isVisible, move, setPosition, setVisible |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Bohater
public Bohater(javax.microedition.lcdui.Image _obraz,
int _nr_planszy_x,
int _nr_planszy_y,
javax.microedition.lcdui.game.TiledLayer _tekstura,
Plotno _plotno)
przesunLewo
public byte przesunLewo(int x)
- Overrides:
przesunLewo
in class ObiektRuchomy
przesunGora
public byte przesunGora(int y)
- Overrides:
przesunGora
in class ObiektRuchomy
przesunDol
public byte przesunDol(int y)
- Overrides:
przesunDol
in class ObiektRuchomy
przesunPrawo
public byte przesunPrawo(int x)
- Overrides:
przesunPrawo
in class ObiektRuchomy
dotarlDoKonca
public boolean dotarlDoKonca()
setKoniec
public void setKoniec(int x,
int y)
kolizja
public boolean kolizja()
strzel
public void strzel()
- Specified by:
strzel
in interface WarunkiStrzelania
laduj
public void laduj()
- Specified by:
laduj
in interface WarunkiStrzelania
mozeStrzelac
public boolean mozeStrzelac()
- Specified by:
mozeStrzelac
in interface WarunkiStrzelania
leci
public boolean leci()