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

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

251. 精灵 · LayaAir3.0文档 · LAYABOX [ 46%]

...毕,此方法只执行一次 */ onAwake(): void { this.sprite2.on(Laya.Event.MOUSE_DOWN, this, this.test2);//设置监听,sprite1或sprite2均可 console.log(this.sprite1.mouseEnabled);//打印父节点sprite1的MouseEnabled的值:true console.log(this.sprite2.mouseEnabled);//打印子节点sp...

来源: Laya3.0_文档 发布时间: 20240528

252. laya.display.Sprite [ 46%]

...All Classes | Index | Frames No Frames SpriteProperties | Methods | Events Packagelaya.displayClasspublic class SpriteInheritanceSprite Node EventDispatcher ObjectImplements laya.display.ILayoutSubclasses AnimationPlayerBase, Component, DialogManager, GridSprite, MapLayer, MovieClip, Particle...

来源: laya_api 发布时间: 20170929

253. laya.ui.Button [ 45%]

...All Classes | Index | Frames No Frames ButtonProperties | Methods | Events Packagelaya.uiClasspublic class ButtonInheritanceButton Component Sprite Node EventDispatcher ObjectImplements ISelectSubclasses CheckBox, Radio Button 组件用来表示常用的多态按钮。 Button 组件可显示...

来源: laya_api 发布时间: 20170929

254. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 45%]

...platform.com/manifests/vM7nH0Kl.m3u8'); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED,function():void{ video.play(); }); } plyr.setup(video); } } new LayaUISample; ``` 编译运行代码,发现网页已经可以播放视频了。开发者可能注意到这里我们初始化引擎的时...

来源: Laya2.0_文档 发布时间: 20210715

255. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 45%]

....drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/LayaAir_AS3/2D/advanced/PerformanceOptimization/CPU/img/1.png) (图1) ...

来源: Laya2.0_文档 发布时间: 20210714

256. laya.ui.Button [ 45%]

...All Classes | Index | Frames No Frames ButtonProperties | Methods | Events Packagelaya.uiClasspublic class ButtonInheritanceButton UIComponent Sprite Node EventDispatcher ObjectImplements ISelectSubclasses CheckBox, Radio Button 组件用来表示常用的多态按钮。 Button 组件可显...

来源: Laya2.0_api 发布时间: 20190513

257. 弹窗视图组件 · LayaAir3.0文档 · LAYABOX [ 44%]

...Script extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需要用到该Dialog的场景管关联起来。回到初始场景Scene,在Scene2D的属性设置...

来源: Laya3.0_文档 发布时间: 20231129

258. 淘宝创意互动分包指南(TypeScript-小游戏适配文档-淘宝创意互动) [ 43%]

...去加载分包和资源 ``` onConfigLoaded(): void { Laya.stage.on(Laya.Event.CLICK, this, this.toPage2) } toPage2(): void { my.redirectTo({ url: "/subpackage1/page2/index", success: function () { console.log("success") }, fail: function (err) { console.log("2222", err) } }) } ``` 注意:在加...

来源: Laya2.0_文档 发布时间: 20210715

259. 请大家帮助优化一下这个抛物线的代码 [ 43%]

...a.stage.width / 2; this.ball.y = Laya.stage.height / 2; Laya.stage.on(Laya.Event.CLICK,this,this.onClick); Laya.timer.frameLoop(1,this,this.onEnterFrame); } private onEnterFrame():void{ if(this.points.length>0){ if(this.i<this.points.length){ this.ball.x = this.points[this.i].x; this.ball.y = ...

来源: Laya_社区 发布时间: 20171108

260. laya.ui.CheckBox [ 42%]

...ll Classes | Index | Frames No Frames CheckBoxProperties | Methods | Events Packagelaya.uiClasspublic class CheckBoxInheritanceCheckBox Button UIComponent Sprite Node EventDispatcher Object CheckBox 组件显示一个小方框,该方框内可以有选中标记。 CheckBox 组件还可以显...

来源: Laya2.0_api 发布时间: 20190513