Constructor
new snowman(pos, numBalls, ballRadius)
snowman constructor function
Parameters:
Name | Type | Description |
---|---|---|
pos |
p5.Vector | Location of the bottom of the snowman |
numBalls |
number | number of balls used to make up the snowman |
ballRadius |
number | Size of the largest ball |
- Source:
Methods
addArms()
gives the snowman twiggy arms
- Source:
addFace()
gives the snowman a wonderful face :-)
- Source:
calculateSize()
calculates the dimensions of the snowman, including all of the ball objects
that make it up.
- Source:
isHitBy() → {boolean}
loops through all balls to see if any of them have been hit by a snowflake
- Source:
Returns:
if the snowman has been hit by a snowflake
- Type
- boolean
show()
draws the snowman
- Source: