mooball
    Preparing search index...

    Interface CustomRoomConfigCallbacks

    interface CustomRoomConfigCallbacks {
        onAfterBinaryCustomEvent?(
            type: number,
            data: Uint8Array,
            byId: number,
            customData?: any,
        ): void;
        onAfterCustomEvent?(
            type: number,
            data: object,
            byId: number,
            customData?: any,
        ): void;
        onAfterIdentityEvent?(
            id: number,
            data: object,
            byId: number,
            customData?: any,
        ): void;
        onBeforeBinaryCustomEvent?(
            type: number,
            data: Uint8Array,
            byId: number,
        ): any;
        onBeforeCustomEvent?(type: number, data: object, byId: number): any;
        onBeforeIdentityEvent?(id: number, data: object, byId: number): any;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Called just after a binary custom event has been triggered.

      Parameters

      • type: number

        Any integer value to hold the type of the custom event.

      • data: Uint8Array

        Any Uint8Array to store the properties of the custom event. This object is directly sent/received by Mooball's original event mechanism.

      • byId: number

        Id of the player who has triggered this custom event.

      • OptionalcustomData: any

        Any custom data that might be returned from the previous addon's calback.

      Returns void

      void.

    • Called just after a custom event has been triggered.

      Parameters

      • type: number

        Any integer value to hold the type of the custom event.

      • data: object

        Any JSON object to store the properties of the custom event. This object is converted to a string and sent/received by Mooball's original event mechanism.

      • byId: number

        Id of the player who has triggered this custom event.

      • OptionalcustomData: any

        Any custom data that might be returned from the previous addon's calback.

      Returns void

      void.

    • Called just after an identity event has been triggered.

      Parameters

      • id: number

        Id of the player whose identity data is desired to be changed.

      • data: object

        The identity data that should be received from the backend. It can be any JSON object.

      • byId: number

        Id of the player who has triggered this custom event.

      • OptionalcustomData: any

        Any custom data that might be returned from the previous addon's calback.

      Returns void

      void.

    • Called just after a binary custom event has been triggered.

      Parameters

      • type: number

        Any integer value to hold the type of the custom event.

      • data: Uint8Array

        Any Uint8Array to store the properties of the custom event. This object is directly sent/received by Mooball's original event mechanism.

      • byId: number

        Id of the player who has triggered this custom event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after a custom event has been triggered.

      Parameters

      • type: number

        Any integer value to hold the type of the custom event.

      • data: object

        Any JSON object to store the properties of the custom event. This object is converted to a string and sent/received by Mooball's original event mechanism.

      • byId: number

        Id of the player who has triggered this custom event.

      Returns any

      void or a custom data to pass to the next callback.

    • Called just after an identity event has been triggered.

      Parameters

      • id: number

        Id of the player whose identity data is desired to be changed.

      • data: object

        The identity data that should be received from the backend. It can be any JSON object.

      • byId: number

        Id of the player who has triggered this custom event.

      Returns any

      void or a custom data to pass to the next callback.