Skip to content

Types.Cameras.Controls ​

Phaser v4.1.0 · 英文原文

FixedKeyControlConfig ​

<static> FixedKeyControlConfig ​

名称类型可选默认值说明
cameraPhaser.Cameras.Scene2D.Camera是控制器会更新的摄像机
leftPhaser.Input.Keyboard.Key是将左侧的摄像机移动的按键 。
rightPhaser.Input.Keyboard.Key是将摄像机右移的按键 。
upPhaser.Input.Keyboard.Key是将摄像机移动的按键。
downPhaser.Input.Keyboard.Key是将摄像机移到下方的按键。
zoomInPhaser.Input.Keyboard.Key是将摄像机放大的按键 。
zoomOutPhaser.Input.Keyboard.Key是将摄像机放大的按键。
zoomSpeednumber是0.01如果按下zoomIn或zoomOut键,摄像机会放大的速度.
speednumber | Object是0摄像机的横向和纵向速度会移动.
minZoomnumber是0.001缩放后,摄像机将达到最小的缩放值。
maxZoomnumber是1000放大时摄像机会达到最大的放大值。

类型: object

所属: Phaser.Types.Cameras.Controls

源码:src/cameras/controls/typedefs/FixedKeyControlConfig.js#L1
引入版本:3.0.0


SmoothedKeyControlConfig ​

<static> SmoothedKeyControlConfig ​

名称类型可选默认值说明
cameraPhaser.Cameras.Scene2D.Camera是控制器会更新的摄像机
leftPhaser.Input.Keyboard.Key是将左侧的摄像机移动的按键 。
rightPhaser.Input.Keyboard.Key是将摄像机右移的按键 。
upPhaser.Input.Keyboard.Key是将摄像机移动的按键。
downPhaser.Input.Keyboard.Key是将摄像机移到下方的按键。
zoomInPhaser.Input.Keyboard.Key是将摄像机放大的按键 。
zoomOutPhaser.Input.Keyboard.Key是将摄像机放大的按键。
zoomSpeednumber是0.01如果按下zoomIn或zoomOut键,摄像机会放大的速度.
accelerationnumber | Object是0摄像机的横向和纵向加速会移动.
dragnumber | Object是0水平拖曳和垂直拖曳在摄像机移动时应用.
maxSpeednumber | Object是0摄像机的最大水平和垂直速度会移动.
minZoomnumber是0.001缩放后,摄像机将达到最小的缩放值。
maxZoomnumber是1000放大时摄像机会达到最大的放大值。

类型: object

所属: Phaser.Types.Cameras.Controls

源码:src/cameras/controls/typedefs/SmoothedKeyControlConfig.js#L1
引入版本:3.0.0



社区翻译