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

2013/6/11

Size

eddietheboss27 eddietheboss27

2013/6/11

#
i'm creating a game for school does anyone know how to change the size in-game with a command? (this may sound a bit amature) thanks
Gevater_Tod4711 Gevater_Tod4711

2013/6/11

#
What do you mean with the size? If you want to change the size of the world you need to create a new world. In the constructor of this world you can set the size to whatever you want (you need to change this part: super(width, height, cellsize))
eddietheboss27 eddietheboss27

2013/6/18

#
Thanks but i need to know with actors not the world sorry i should have been more specific.
Gevater_Tod4711 Gevater_Tod4711

2013/6/18

#
If you want to change the size of an actor you have to scale it's image:
//in your actor subclass;
getImage().scale(newX, newY);
//newX and newY should be int's that represent the new size of your actor.
You need to login to post a reply.