跳转至

ParallaxLayer

继承

Node2D

简要描述

ParallaxBackground一起使用的视差滚动层。

描述

ParallaxLayer必须是ParallaxBackground节点的子级。

该节点的子节点将受其滚动偏移量的影响。

**注意:**该节点进入场景后对其位置和比例所做的任何更改都将被忽略。

成员

类型 属性名 默认值
Vector2 motion_mirroring Vector2( 0, 0 )
Vector2 motion_offset Vector2( 0, 0 )
Vector2 motion_scale Vector2( 1, 1 )

成员说明

  • Vector2 motion_mirroring
Default Vector2( 0, 0 )
setter set_mirroring(value)
getter get_mirroring
  • Vector2 motion_offset
Default Vector2( 0, 0 )
setter set_motion_offset(value)
getter get_motion_offset
  • Vector2 motion_scale
Default Vector2( 1, 1 )
setter set_motion_scale(value)
getter get_motion_scale