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

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

1. 鼠标交互-鼠标交互 [ 100%]

...ouseHandler); rect.on(Event.CLICK, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, this.mouseHandler); rect.on(Event.RIGHT_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_MOVE, this, this.mouseHandler); rect.on(Event.MOUSE_...

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

2. UI-Tree [ 96%]

...2", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}}, {"type": "Clip", "props": {"y": "4", "x": "14", "name": "folder", "clipX": "1", "skin": "ui/clip_tree_folder.png", "clipY": "3"}}, {"type": "Label", "props": {"y": "1", "text": "treeItem", "width"...

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

3. 屏幕适配-屏幕适配 [ 85%]

...new Image(); boy1.skin = "res/cartoonCharacters/1.png"; boy1.top = 0; boy1.right = 0; boy1.on("click", this, this.onBoyClick); Laya.stage.addChild(boy1); //实例一个小人,放到右下角,并相对布局 let boy2 = new Image(); boy2.skin = "res/cartoonCharacters/2.png"; boy2.bottom = 0; boy2....

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

4. Sprite-屏幕截图 [ 81%]

...; btn.on(Laya.Event.CLICK,this,cb); btn.size(147,55); btn.name = name; btn.right = 10; btn.top = index * (btn.height + 10); return btn; } onLoaded(){ for (let index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; private nameArr:Array = ["canvas截图","sprite截图","清理"]; ...

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

5. 文本-下划线 [ 80%]

...100, 10); this.createText('center', "#00BFFF", 155, 150); this.createText('right', "#FF7F50", 210, 290); } createText(align, underlineColor, x, y) { const Text = Laya.Text; let txt = new Text(); Laya.stage.addChild(txt); txt.text = "Layabox\n是HTML5引擎技术提供商\n与优秀的游戏发行商...

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

6. 缓动-时间线 [ 70%]

...上个动画的偏移时间(单位:毫秒) this.timeLine.addLabel("turnRight", 0).to(this.target, {x:450, y:100, scaleX:0.5, scaleY:0.5}, 2000, null, 0) .addLabel("turnDown", 0).to(this.target, {x:450, y:300, scaleX:0.2, scaleY:1, alpha:1}, 2000, null, 0) .addLabel("turnLeft", 0).to(this.target, {...

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

7. 鼠标交互-修正交互区域 [ 69%]

... Text(); logger.size(Laya.stage.width, Laya.stage.height); logger.align = 'right'; logger.fontSize = 20; logger.color = "#FFFFFF"; Laya.stage.addChild(logger); } /**侦听处理方法*/ onDown(e) { logger.text += "点击 - " + e.target.name + "\n"; } } new Interaction_FixInteractiveRegion();module l...

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

8. 2D物理-桥 [ 67%]

...新的小球刚体,击向bridge的随机位置")); label.top = 20; label.right = 20; label.fontSize = 16; label.color = "#e69999"; } dispose() { Laya.Laya.stage.offAll(Laya.Event.CLICK); Laya.Laya.stage.removeChild(this.label); } } new Physics_Physics_Bridge();import { Laya } from "Laya"; import {...

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

9. 2D物理-复合碰撞器 [ 60%]

...双击屏幕,将会产生100个新的小刚体")); label.top = 20; label.right = 20; label.fontSize = 16; label.color = "#e69999"; Laya.Laya.stage.on(Laya.Event.DOUBLE_CLICK, this, () => { this.totalBox += 100; }); Laya.Laya.timer.frameLoop(1, this, this.addMiniBox); } dispose() { Laya.Laya.stage....

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

10. UI-RefreshList [ 47%]

...ructor(){ super(); this.width = 443; this.height = 86; this.left = 0; this.right = 0; this.zOrder = 2; this.initItem(); } /** 初始化列表子项内容 * */ public function initItem(){ // 列表item的背景图 this.msgBG = new Image("res/ui/refreshList/img_bg22.png"); this.addChild(this.msgBG); t...

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