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

2013/6/4

whats an attribute ?

sergiodeleon702 sergiodeleon702

2013/6/4

#
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; /** * Write a description of class Puck here. * * @author (Sergio Deleon) * @version (06/04/13) */ public class Puck extends Actor { public Puck() { getImage().clear(); getImage().scale(25, 25); getImage().setColor(Color.black); getImage().fillOval(0, 0, 25, 25); } private int speed = 5; public void act() { move(speed); } public void setSpeed(int speed) { this.speed = speed; } }
Game/maniac Game/maniac

2013/6/4

#
please explain your question
You need to login to post a reply.