import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.*; /** * Write a description of class MyName here. * * @author (your name) * @version (a version number or a date) */ public class MyName extends SmoothMover { public MyName() { setImage(new GreenfootImage("Game/maniac", 17, Color.white, new Color(0, 0, 0, 0))); } public void act() { if(getY() < getWorld().getHeight()/2+117) { setLocation(getX(), getY()+1); } else if(getY() > getWorld().getHeight()/2+117) { setLocation(getX(), getY()-1); } } }