1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class background here. * * @author (your name) * @version (a version number or a date) */ public class background extends Actor { int x = getX(); int y = getY(); public void act() { setRotation( 90 ); World W = getWorld(); if (Greenfoot.isKeyDown( "up" )){ move( 2 ); } if (Greenfoot.isKeyDown( "down" )){ move(- 2 ); } } public int getXB(){ return x; } public int getYB(){ return y; } } |

