File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Killer game programming in java..... JumpingJack

 
Fernando hiar
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic