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

2013/3/7

How do i make something Small?

TheReapsz99 TheReapsz99

2013/3/7

#
i want to make the rocket smaller in my scenario how do i do it?
Gevater_Tod4711 Gevater_Tod4711

2013/3/7

#
To change the size of an actor you can either change the image of the actor (the file) or change the greenfootImage of the actor using the scale method. For example:
//in your rocket class

public Rocket() {
    getImage().scale(newX, newY); //instead of newX and newY you have to use the new size (x and y) of the image.
}
You need to login to post a reply.