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

2014/3/17

GetX(),GetY()

Pointifix Pointifix

2014/3/17

#
Hi, me again. I wanted to know why i cant use GetX() or GetY() in my public Actor() class, cause the int value of GetX() and GetY() has not enough resolution to get an exact rolling ball.
Zamoht Zamoht

2014/3/17

#
You should import the SmoothMover class - I think thats the name.
Pointifix Pointifix

2014/3/17

#
ah very good idea never thought on that sry, thanks ;)
Pointifix Pointifix

2014/3/17

#
how can i access the move(double distance) method of smooth mover?
Zamoht Zamoht

2014/3/17

#
Just use the move method and insert a double value instead of the normal int value. Only works in subclasses of the smoothmover.
danpost danpost

2014/3/17

#
If the class of the actor in question extends SmoothMover, then you should have no problem with just calling it directly:
move(doubleValue);
Pointifix Pointifix

2014/3/17

#
ok must be a subclass of smoothmover thats the problem thanks ;)
You need to login to post a reply.