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

2013/9/21

I have a problem "cannot find symbol - method getX()". Can you help me? because i'm newbie.

elfath elfath

2013/9/21

#
public void act(){ gerak(); } // gerakannya public void gerak(){ String tombol=Greenfoot.getKey(); if (tombol=="right") setLocation(getX()+1,getY()); if (tombol=="left") setLocation(getX()-1,getY()); if (tombol=="up") setLocation(getX(),getY()-1); if (tombol=="down") setLocation(getX(),getY()+1); }
erdelf erdelf

2013/9/21

#
are u in an actor subclass?
You need to login to post a reply.