This site requires JavaScript, please enable it in your browser!
Greenfoot back
programmer274
programmer274 wrote ...

2012/12/10

getHeight method

programmer274 programmer274

2012/12/10

#
Does anyone know any code for a get height method? I want it to return the height of an object.
programmer274 programmer274

2012/12/10

#
nvm everyone!!!!
actinium actinium

2012/12/10

#
If you want the height for an Actor use the getImage() method i.e.
getImage().getHeight()
The GreenfootImage class contains the getHeight method that returns the Height of an image. I am guessing you want the height of an Actors image. Check out the greenfoot docs for GreenfootImage.
You need to login to post a reply.