1.0.1 • Published 5 months ago
xverse-components-game-avoid-obstacles v1.0.1
API
参数名 | 类型 | 说明 | 默认值 | 是否必填 | 备注 |
---|---|---|---|---|---|
onExit | () => void | 退出游戏的回调 | - | false | - |
onNext | () => void | 完成游戏的回调 | - | false | - |
onFail | () => void | 游戏失败的回调 | - | false | - |
targetDuration | number | 目标达成时长 | - | true | 单位:秒 |
backgroundImage | string | 背景图片 | - | true | - |
controller | IObstacle[] | 被控制物体,设置一个即可 | - | true | - |
obstacles | IObstacle[] | 障碍物 | - | true | - |
noticeBackgroundImage | string | 提示背景图片 | - | true | - |
noticeBackgroundStyle | CSSProperties | 提示背景图片样式 | - | false | - |
noticeText | string | 提示文本 | - | false | - |
noticeTextStyle | CSSProperties | 提示文本样式 | - | false | - |
collisionNoticeBackgroundImage | string | 碰撞提示背景图片 | - | true | - |
collisionNoticeBackgroundStyle | CSSProperties | 碰撞提示背景图片样式 | - | false | - |
noticeBtnImage | string | 提示按钮图片 | - | true | - |
noticeBtnStyle | CSSProperties | 提示按钮图片样式 | - | false | - |