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

2017/9/27

How to make two different actors react to pressing one single key?

AndreiTir AndreiTir

2017/9/27

#
I want to make a program for twister and I have an actor for the color and one for the hand/foot. There is a problem because if I put the same command ( if(Greenfoot.getKey()=="enter") ) in the code of both actors, the second one does something only if I'm holding the key pressed and only after few seconds.
Super_Hippo Super_Hippo

2017/9/27

#
Try to use the 'isKeyDown' method.
You need to login to post a reply.