Appearance
Usage
Basic Setup
typescript
// Import statements
import {
ErrorCategory,
ErrorSeverity,
OperatorInterface,
OperatorInterfaceToGameMessage,
OperatorProtocol,
RegisterOption
} from '@hoelle/operator-interface';
// Enable logging
OperatorInterface.log = true;
// Initialize OperatorInterface
await OperatorInterface.setup(
operatorProtocol,
gameCode,
currencyCode,
languageCode,
playerID,
mode,
lobbyURL,
isMobile
);Event Handling
Listening for Events
typescript
// Listen for an incoming mute event and mute the game
OperatorInterface.on('muteRequested', this.mute.bind(this));Broadcasting Events
typescript
// Broadcast an outgoing event
OperatorInterface.spinAnimationStarted();