Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Constants representing the radius of the top, middle,
- * and bottom snowball. */
- var BOTTOM_RADIUS = 100;
- var MID_RADIUS = 60;
- var TOP_RADIUS = 30;
- function start(){
- var bottomY = getHeight() - BOTTOM_RADIUS;
- var midY = bottomY - BOTTOM_RADIUS - MID_RADIUS;
- var topY = midY - MID_RADIUS - TOP_RADIUS;
- var bottomCircle = new Circle(BOTTOM_RADIUS);
- bottomCircle.setPosition(getWidth()/2, bottomY);
- bottomCircle.setColor(Color.gray);
- add(bottomCircle);
- var middleCircle = new Circle(MID_RADIUS);
- middleCircle.setPosition(getWidth()/2, midY);
- middleCircle.setColor(Color.gray);
- add(middleCircle);
- var topCircle = new Circle(TOP_RADIUS);
- topCircle.setPosition(getWidth()/2, topY);
- topCircle.setColor(Color.gray);
- add(topCircle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement