• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Killer game programming in java..... JumpingJack

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic