• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 6 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0048 秒)

1. 2D物理-复合碰撞器 [ 100%]

...r.width / 2, posy = Laya.Browser.height / 2; let box = this.box = new Laya.Sprite(); box.size(width + height * 2, width + height * 2); box.pivot(box.width / 2, box.height / 2); box.pos(posx, posy); Laya.Laya.stage.addChild(box); let boxBody = box.addComponent(Laya.RigidBody); let box1Shape = box.add...

来源: Laya2.0_示例 发布时间: 20241117

2. 2D物理-碰撞事件与传感器 [ 88%]

...= "#232628"; this.createSensor(); } createSensor() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider...

来源: Laya2.0_示例 发布时间: 20241117

3. 2D物理-碰撞过滤器 [ 77%]

...} } new Physics_Physics_CollisionFiltering();package { import laya.display.Sprite; import laya.display.Stage; import laya.events.Event; import laya.physics.BoxCollider; import laya.physics.ChainCollider; import laya.physics.CircleCollider; import laya.physics.joint.MouseJoint; import laya.physics.Ph...

来源: Laya2.0_示例 发布时间: 20241117

4. 2D物理-仿生机器人 [ 73%]

...s.Construct(); this.eventListener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.po...

来源: Laya2.0_示例 发布时间: 20241117

5. 缓动-缓动函数演示 [ 72%]

...ctionList(); this.createDurationCrontroller(); } createCharacter() { const Sprite = Laya.Sprite; character = new Sprite(); Laya.stage.addChild(character); character.loadImage("res/cartoonCharacters/1.png"); character.pos(100, 50); } createEaseFunctionList() { const List = Laya.List, Handler = Laya.H...

来源: Laya2.0_示例 发布时间: 20241117

6. 2D物理-桥 [ 70%]

...teBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider...

来源: Laya2.0_示例 发布时间: 20241117