Advertisement
Guest User

Jumping Game Sprites

a guest
May 27th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. void drawIceCream(float xvalue, float yvalue){
  2. fill(255);
  3. ellipse(xvalue, yvalue - 30, 14, 14);
  4. fill(#715B00);
  5. ellipse(xvalue - 4, yvalue - 24, 14, 14);
  6. fill(#FFAAB4);
  7. ellipse(xvalue + 4, yvalue - 24, 14, 14);
  8. fill (#AF8E09);
  9. triangle (xvalue, yvalue, xvalue - 10, yvalue - 20, xvalue + 10, yvalue - 20);
  10. }
  11.  
  12. void drawStickFigure(float xvalue, float yvalue){
  13. fill (255);
  14. stroke (0);
  15. ellipse (xvalue, yvalue - 45, 20, 20);
  16. line (xvalue, yvalue - 35, xvalue, yvalue - 15);
  17. line (xvalue - 12, yvalue - 25, xvalue + 12, yvalue - 25);
  18. line (xvalue, yvalue - 15, xvalue - 5, yvalue);
  19. line (xvalue, yvalue - 15, xvalue + 5, yvalue);
  20. }
  21.  
  22. void drawBoxy(float x, float y) { // He's 20 by 40; x and y are the middle of his feet.
  23. // Changes fill color to white.
  24. stroke(0);
  25.  
  26. // Body
  27. fill(#98673F); // Hair color
  28. rect(x-10, y-40, 20, 5); // Hair
  29. fill(#E3D5B9); // Face color
  30. rect(x-10, y-35, 20, 10); // Face
  31. fill(#117635); // Shirt color
  32. rect(x-10, y-25, 20, 10); // Shirt
  33. fill(#111F76); // Pants color
  34. rect(x-10, y-15, 20, 10); // Pants
  35. fill(0); // Shoes color
  36. rect(x-10, y-5, 20, 5); // Shoes
  37.  
  38. // Eyes
  39. fill(255); // Eye color
  40. ellipse(x-4, y-31, 2, 2); // Left eye
  41. ellipse(x+4, y-31, 2, 2); // Right eye
  42.  
  43. fill(255); // Resetting fill to default white
  44. }
  45.  
  46. void drawEllipse(float xvalue, float yvalue){
  47. ellipse (xvalue, yvalue - 15, 20, 30);
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement