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

2013/6/24

reached end of file while parsing

Black0utHD Black0utHD

2013/6/24

#
The Programm said i don't need "}" without a "{" but there is a "{" import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Rocket here. * * @author (your name) * @version (a version number or a date) */ public class Rocket extends Actor { /** * Act - do whatever the Rocket wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { bewegen(); } /** * * Diese Methode gestattet es der Rackete zu sich zu bewegen. * Mit den Pfeiltasten kann man ihn steuern. * setLocation setzt den neuen Standort fest anhand des altem punktes x, y */ private void bewegen(){ int x = getX(); // Nimmt die X-Koordinate auf int y = getY(); // Nimmt die Y-Koordinate auf if(Greenfoot.isKeyDown("right")){ setLocation(x + 2, y); // setLocation setzt den neuen Standort fest } else if(Greenfoot.isKeyDown("left")){ setLocation(x - 2, y); } else if(Greenfoot.isKeyDown("up")){ setLocation(x, y - 2); } else if(Greenfoot.isKeyDown("down")){ setLocation(x, y + 2); } }
Black0utHD Black0utHD

2013/6/24

#
Okay i got it no help is need
You need to login to post a reply.