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

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

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

...; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBox(); this.eventListener(); } createBox() { const width = 300, height = 20; const posx = Laya.Browser.width / 2, posy = Laya.Browser.height / 2; let box = this.box = new Laya.Sprite(); box.siz...

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

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

...; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createSensor(); } createSensor() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(grou...

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

3. UI-List [ 96%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const List = Laya.List, Handler = Laya.Handler; let list = new List(); Laya.stage.addChild(list); list.itemRender = Item; list.repeatX = 1; list.repeatY = 4; list.x ...

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

4. UI-Tree [ 89%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); let res = [ "res/ui/vscroll.png", "res/ui/vscroll$bar.png", "res/ui/vscroll$down.png", "res/ui/vscroll$up.png", "res/ui/tree/clip_selectBox.png", "res/ui/tree/clip_tree_folder.png", "res/ui/t...

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

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

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createCharacter(); this.createEaseFunctionList(); this.createDurationCrontroller(); } createCharacter() { const Sprite = Laya.Sprite; character = new Sprite(); Laya.stage.ad...

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

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

...; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(...

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

7. 2D物理-碰撞过滤器 [ 79%]

...; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createHouse(); for (let i = 1; i mouseJoint).onMouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.destoryJoint); Laya.stage.on(Event.MOUSE_OUT, this, this.destoryJoint); // 方案二,自己实现...

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

8. UI-RefreshList [ 79%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load("res/ui/refreshList/ani/refresh.png", Handler.create(this, function(){ this.initView(); })); } initView(){ // 加载并添加场景中需要使用的资源 this.baseBox = new Box(); this....

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

9. 2D物理-仿生机器人 [ 71%]

...; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.Construct(); this.eventListener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addCompone...

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