GroundAttacher 组件
当它着陆时将实体连接到地面。对于移动平台游戏很有用。删除组件将会禁用此功能。
此外,此组件为实体提供 Supportable
的方法和事件。
例子
Crafty.e("2D, Gravity, GroundAttacher")
.gravity("Platform"); // entity will land on and move with entites that have the "Platform" component
当它着陆时将实体连接到地面。对于移动平台游戏很有用。删除组件将会禁用此功能。
此外,此组件为实体提供 Supportable
的方法和事件。
Crafty.e("2D, Gravity, GroundAttacher")
.gravity("Platform"); // entity will land on and move with entites that have the "Platform" component