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

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

1. js飞机大战报错 请大神看看 [ 100%]

...       this.infoLabel=null; GameInfo.js: var GameInfo = (function (_super) {     function GameInfo() {         GameInfo.super(this);         // this.infoLabel.text = "abc"; 这个也报异常应该是找不到infoLabel         // 注册按钮点击事件 点击后暂停游戏   ...

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

2. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 99%]

...91859396用户 • 2020-06-11 15:11 @Laya_Aaron:var MainSceneUI=(function(_super){ function MainSceneUI(){ this.Btn_Task=null; MainSceneUI.__super.call(this); } CLASS$(MainSceneUI,'ui.MainSceneUI',_super); var __proto__=MainSceneUI.prototype; __proto__.createChildren=function(){ _super.prototype.cre...

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

3. 关于实例化 动画特效.efc 文件的问题 [ 93%]

...时候报错: 具体是layaUI.max.all.js里的这一行:effect01UI.__super.call(this); TypeError: Cannot read property 'call' of undefined   请问我应该怎么实例化 effectAnimation.efc 这种模板?   2018-01-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

4. 3D变换 · LayaAir3.0文档 · LAYABOX [ 89%]

...ivate translate: Laya.Vector3 = new Laya.Vector3(1, 1, 1); constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { // 平移cube this.cube.transform.translate(this.translate, false); } } 效果如图1-1...

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

5. 针对2.0.0 beta5 setLoadingPage 做增强 [ 88%]

.../loadPage' export default class page1 extends Laya.Scene { constructor() { super() } onEnable() { // 预加载loadPage let loadPage = new LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方式 查看效果不同 loadPage.openSce...

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

6. 列表组件 · LayaAir3.0文档 · LAYABOX [ 78%]

...ya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any> = []; for (var m: number = 0; m < 20; m++) { data.push({ m_label: "No." + m })...

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

7. 对象池 · LayaAir3.0文档 · LAYABOX [ 74%]

...的方式进行管理对象池: export class EffectA { constructor() { super(); } static create(): EffectA { Pool.getItemByClass(EffectA); } recover(): void { Pool.recoverByClass(this); } } export class EffectB { constructor() { super(); } static create(): EffectB { Pool.getItemByClass(EffectB); }...

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

8. 字体切片组件 · LayaAir3.0文档 · LAYABOX [ 69%]

... { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fo...

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

9. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 68%]

...public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName("CMatShader"); ...

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

10. 场景管理 · LayaAir3.0文档 · LAYABOX [ 64%]

...property({ type: Laya.Button }) public uiBtn: Laya.Button; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.uiBtn.on(Laya.Event.CLICK, this, () => { //点击后,打开Msg场景 Laya.Sce...

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