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

大约有 7 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0020 秒)

1. 2D物理-碰撞过滤器 [ 100%]

...t laya.physics.RigidBody; import laya.utils.Stat; import laya.webgl.WebGL; public class Physics_Physics_CollisionFiltering { public static const k_smallGroup = 1; public static const k_middleGroup = 0; public static const k_largeGroup = -1; public static const k_triangleCategory = 0x2; public static...

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

2. UI-List [ 97%]

...import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: string): void {...

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

3. 性能测试-卡通人物2 [ 83%]

...is.text.text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { super(); this.cre...

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

4. 鼠标交互-自定义事件 [ 80%]

...a.Tween; import WebGL = Laya.WebGL; export class Interaction_CustomEvent { public static ROTATE: string = "rotate"; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya....

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

5. 2D物理-桥 [ 77%]

...dy; import laya.ui.Label; import laya.utils.Stat; import laya.webgl.WebGL; public class Physics_Physics_Bridge { private var ecount = 30; private var label: Label; public function Physics_Bridge() { Laya.Config.isAntialias = true; Laya.init(1200, 700, WebGL); Stat.show(); Physics.enable(); PhysicsDe...

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

6. 2D物理-仿生机器人 [ 72%]

...dy; import laya.ui.Label; import laya.utils.Stat; import laya.webgl.WebGL; public class Physics_Physics_Strandbeests { private var scale = 2.5; private var pos: Array = [500, 400]; private var m_offset: Array = [0, -80 * this.scale]; private var pivot: Array = [0, 8 * this.scale]; private var wheel:...

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

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

...t laya.physics.RigidBody; import laya.utils.Stat; import laya.webgl.WebGL; public class Physics_Physics_CollisionEvent { private var count: Number = 7; private var sensorCollider: CircleCollider; private var bodys: Array = []; private var touching: Array = []; public function Physics_CollisionEvent(...

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