Initialization
The initialization of the PlayAI SDK requires two or more parameters:
gameID
: This is a unique identifier assigned to your game. It is mandatory for the initialization process.gameContainer
: This is a CSS selector that targets the HTML element where the game will be rendered. This parameter is also mandatory.playAIStyles
ordemo
(optional): This is an object that allows you to customize the appearance of the action bar or a string field to render the demo version of the SDK. If theplayAIStyles
parameter is provided, it will be used for customization. If not, and thedemo
parameter is provided, it will be used to render the demo version of the SDK. Thedemo
value can berecording
oronboarding
. If neither is provided, the SDK will apply a default style to the action bar.demo
(optional): This is a string field that, when provided, will render the SDK in demo mode with the specified styles. The value can berecording
oronboarding
. This parameter is used when you want to apply custom styles and also render the SDK in demo mode.
Here are examples of how you can initialize the PlayAI SDK:
Last updated