Hello, I am having problems creating a polygon and an array. So far I have this:
The aim is to create a triangular cursor. Help? Please?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import greenfoot.*; public class Mouse extends Conector { public void act() { } public void addedToWorld(World world) { GreenfootImage image = new GreenfootImage( 20 , 20 ); int [] xs = { 0 , 5 , 10 }; int [] ys = { 10 , 0 , 10 }; image.drawPolygon(xs, ys, 1 ); } } |