Game

The Game module enables developers to track player interactions and trigger game-related events.

2.1 Gameplay Events

gamePlayStart()

Called when a game session starts.

BananaClip.gamePlayStart();

gamePlayStop()

Called when a game session ends.

BananaClip.gamePlayStop();

2.2 Loading Events (Planned for next update)

loadingStart()

Called when the game starts loading.

BananaClip.loadingStart();

loadingStop()

Called when the game finishes loading.

BananaClip.loadingStop();

2.3 Celebrations

happyTime()

Triggers a visual celebration (confetti, animations, etc.) when a player achieves a milestone.

BananaClip.happyTime();

Note: This should not be used for level completion or item collection.

2.4 Invite Players

inviteLink()

Generates an invite link that can be shared with other players.

const link = BananaClip.inviteLink();

Last updated