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

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

721. 附加脚本的使用问题 [ 54%]

附加脚本的使用问题 class ScaleButton {     constructor() {         console.log("加载ScaleButton");     }     private _owner: any;     public set owner(o: laya.display.Sprite) {         this._owner = o;         console.log("设置owner");     }     public get owner...

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

722. 关于页面跳转的困惑,class初始化和释放的问题。 [ 54%]

...面的跳转,但是发现再次 从A跳转到B的时候,class B里的constructor 却执行了两次,然后再操作,变4次,无线递增,怎么解决呢。是什么原因导致的呢?   2017-09-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请...

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

723. 动画节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.ani.source = "resources/role.atlas"; //接收动画数据源为图集 thi...

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

724. 缓动-时间线 [ 54%]

...开发语言、LayaAirIDE让项目开发更高效。class Tween_TimeLine { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.A...

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

725. 鼠标脚本(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 54%]

...class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(){ this.meshsp = this.owner as Laya.MeshSprite3D(); } //物体必须...

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

726. laya.d3.math.BoundBox [ 54%]

...ax:Vector3最大顶点。minproperty public var min:Vector3最小顶点。Constructor DetailBoundBox()Constructorpublic function BoundBox(min:Vector3, max:Vector3) 创建一个 BoundBox 实例。 Parameters min:Vector3 — 包围盒的最小顶点。  max:Vector3 — 包围盒的最大顶点。 Me...

来源: laya_api 发布时间: 20170929

727. UI编辑发布后运行lose skin [ 54%]

...oader = Laya.Loader; // 程序入口 class GameMain{ private begin: Begin; constructor() { Laya.init(600,400, WebGL); Laya.stage.bgColor = "#000000"; Laya.loader.load("comp/button.png", Handler.create(this, this.onLoaded)); } private onLoaded(): void { this.begin = new Begin(); Laya.stage.addChild(t...

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

728. 为什么hitTestPoint始终是false? [ 54%]

...ss TestUI extends Laya.Sprite { private s:Laya.Sprite = new Laya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console....

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

729. htmlDiv中img图片大小问题 [ 54%]

htmlDiv中img图片大小问题 // 程序入口 class GameMain{ constructor() { Laya.init(600,400); let htmlDiv = new Laya.HTMLDivElement(); let imgUrl = 'images/kb-emoji-U+E056.png'; // origin width/height: 64/64px; //let imgStr = `<img src="${imgUrl}" width="30" height="30"></img>`; l...

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

730. clearRes好像没作用,或许我的用法不对 [ 54%]

...,或许我的用法不对 刚才代码路径有误,更正如下     constructor() {         super();         Laya.stage.on(Laya.Event.KEY_UP, this, this.onKeyUp);     }     onKeyUp(e: Laya.Event) {         if (e.keyCode == 65) {//A             console.log("释...

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