Guest User

Untitled

a guest
Jul 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. class Icicle {
  2. PVector loc, dev, fall;
  3.  
  4. Icicle(float x) {
  5. loc = new PVector(x,0,(height/3)*(random(0.5,1)));
  6. dev = new PVector(0,0,2);
  7. fall = new PVector(9.8,0,9.8);
  8. }
  9.  
  10. void render() {
  11. noStroke();
  12. fill(205);
  13. rectMode(CORNER);
  14. ellipseMode(CORNER);
  15. rect(loc.x,loc.y,10,loc.z);
  16. ellipse(loc.x,loc.z-5,10,10);
  17. }
  18.  
  19. void grow() {
  20. loc.add(dev);
  21. }
  22. }
Add Comment
Please, Sign In to add comment