Members
(inner, constant) angryAudio :HTMLAudioElement
Audio played when the crab is angry.
Type:
- HTMLAudioElement
(inner, constant) boop :HTMLAudioElement
Boop audio play.
Type:
- HTMLAudioElement
(inner, constant) crab :HTMLElement
Crab image element.
Type:
- HTMLElement
(inner, constant) crabChat :HTMLElement
Crab chat bubble element.
Type:
- HTMLElement
(inner, constant) happyAudio :HTMLAudioElement
Audio played when the crab is happy.
Type:
- HTMLAudioElement
(inner, constant) stomp :HTMLAudioElement
Stomp audio play.
Type:
- HTMLAudioElement
Methods
(static) angryCrab(text)
Changes the crab's image to an angry state, displays the chat bubble with
the given text, and plays the "angry" sound.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | The message to display in the crab's chat bubble. |
(static) boopCrab()
Changes the crab's image to a happy state, hides the chat bubble,
and plays the "boop" sound.
(static) happyCrab(text)
Changes the crab's image to a happy state, displays the chat bubble with
the given text, and plays the "happy" sound.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | The message to display in the crab's chat bubble. |
(static) stompCrab(text)
Changes the crab's image to a neutral state, displays the chat bubble with
the given text, and plays the "stomp" sound.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | The message to display in the crab's chat bubble. |