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

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

181. 动画节点 · LayaAir3.4 · 引擎文档 · LAYABOX [ 62%]

... const { regClass, property } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件...

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

182. [LayaAirIDE3]LayaAirIDE3 自定义UI组件 [ 62%]

...统。 我想自己对新的UI系统包装一层,比如:class CButton extends GButton {} 以便后续项目有特别需求的时候,能够统一在如CButton类中统一处理。 我目前遇到的问题是: 1. 自定义的UI组件,如何在IDE中显示出来,便于可视化拼界面的...

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

183. 实例化 laya.ani.bone.Skeleton 对象报错 [ 62%]

...例化 laya.ani.bone.Skeleton 对象报错 export default class showSpine extends Laya.Script{ constructor() { super(); //创建一个Skeleton对象 //Laya let skeleton: laya.ani.bone.Skeleton = new laya.ani.bone.Skeleton(); } } 实例化报错 为啥 2018-09-28 添加评论 免费帖 --> 分享 微...

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

184. Tween.to时添加滤镜 [ 61%]

...为getter和setter,以写子类继承为例: public class CustomBitmap extends Sprite { public function CustomBitmap() { } public get luminance():Number { //返回亮度参数值 //... } //亮度,其他一样 public set luminance(value:Number):void { //你自己的处理代码 //... } } var disp...

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

185. 微信小游戏,实现监听前后台切换 [ 61%]

...ntroller.js  import wxHelper from 'wxhelper' export default class welcome extends Laya.Script { constructor() { super() } onEnable() { wxHelper.onShow(this.resumeGame) wxHelper.onHide(this.pauseGame) } resumeGame () { console.log('resumeGame') } pauseGame () { console.log('pauseGame') } onDestroy (...

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

186. HTMLIframeElement加载html网页的问题 [ 61%]

...et.Loader; import HTMLIframeElement = Laya.HTMLIframeElement; class TestUI extends ui.htmlUI { constructor() { super(); var iHtml: HTMLIframeElement = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href = "https://www.baidu.com/"; } } // 程序入口 Laya.init(600, 400); Laya.loader.load...

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

187. 鼠标脚本(ActionScript-3D基础(AS3)-LayaAir3D之鼠标交互) [ 61%]

...都添加了脚本。 > **脚本类**: ```typescript class MouseScript extends Script3D{ private var meshsp:MeshSprite3D; public function MouseScript() {} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ override public func...

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

188. 聊天消息对话框中new一个HTMLDivElement 报错"Illegal constructor",请问这个该怎么处理? [ 61%]

...错"Illegal constructor",请问这个该怎么处理? class ChatLineView extends Laya.Box{ textfield : any = null; constructor(){ super(); // this.initLineView(); } public initLineView (data) : void { this.pos(0,0); console.log(this.textfield); if (this.textfield == null) { var stextfield = new HT...

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

189. Tab组件如何通过js控制选中 [ 61%]

...当前的选项,说明继承没有问题,但是无法更改 class Tab extends TabUI{ constructor() { super() this.zOrder = 1 console.log(this._tab._selectedIndex) //返回1,正常 this._tab._selectedIndex = 0 } } xdkaka • 2017-12-14 17:40 发布肯定是已经发布了的。。。。看了...

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

190. 切换后台时,引擎如何判断是否停止定时器? [ 61%]

...否停止定时器? 在pc上时,做个简单的测试, class TestUI extends ui.test.TestPageUI {      constructor() {         super();          this.stage.on(Laya.Event.FOCUS, this, this.onFocus);         this.stage.on(Laya.Event.BLUR, this, this.onBlur);     ...

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