Constructor
new ThrowableObject(x, y)
Creates an instance of ThrowableObject.
Initializes the throwable object with default values and loads the images.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | The x-coordinate of the throwable object. |
y |
number | The y-coordinate of the throwable object. |
- Source:
Methods
bottleRotation()
Plays the bottle rotation animation.
- Source:
bottleSplash()
Plays the bottle splash animation and stops the object's movement.
- Source:
throw()
Throws the object by setting its initial speed and applying gravity.
- Source: