| Author |
Killer game programming in java..... JumpingJack
|
Fernando hiar
Greenhorn
Joined: Jan 11, 2008
Posts: 29
|
|
In this book, there´s method.
xSprite = x - Axis of Sprite
pHeight = size of JPanel
columnBricks = ArrayList
Brick b = Object whot the contructor hs 3 arguments x-Axis, y - Axis and ImgeID
getLocY() = the y - coordinate of Bricks or floor.
imWidth = width of the each brick image, width of the each Imge of the floor.
In other class I get this method:
locy = brickman.findFloor(locx + getWidth()/2) - getHeight();
locx = location of the image of sprite onte the x axis.
getWidth() = the width of the Imge of Sprite
getHeight() = the height of the Image of sprite.
sprite = jack or the player.
My doubt of theses codes is I can´t see the location of Spriye above of the floor like he is stepping on the floor.
I just see the location on the x - coordinte and the create the column of Brick in each x - axis. Somebody can help me???
Page 330 of this book..... Killer game programming in java.
|
 |
 |
|
|
subject: Killer game programming in java..... JumpingJack
|
|
|