# Function: onSwitchGamesInvitationReceived
▸ onSwitchGamesInvitationReceived(this
: void, handler
: SwitchGamesInvitationReceivedEventHandler): void
监听对方换个游戏的邀请
description
注意⚠️:仅有乐匹配模式下支持
# 参数:
属性 | 类型 | 描述 |
---|---|---|
this | void | - |
handler | SwitchGamesInvitationReceivedEventHandler | 事件触发的回调方法 |
SwitchGamesInvitationReceivedEventHandler: MogsEventHandler‹SwitchGamesInvitationReceivedEvent›
SwitchGamesInvitationReceivedEvent
结构
属性 | 类型 | 描述 |
---|---|---|
acceptInvitation | Function | 接受邀请的方法,可直接执行 |
anchorParam? | object | 来自派对游戏房间邀请 |
gameIcon | string | 游戏图标 |
gameId | number | 游戏Id |
gameName | string | 游戏名称 |
singleBattleParam? | SingleBattleInviteParam | 来自1v1邀请 |
smobaParam? | SmobaInviteParam | 来自王者荣耀邀请 |
type | SwitchGamesInvitationReceived | 事件类型,由具体的事件构造时提供 |
# 返回值:
void