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

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

11. event自定义事件的问题 [ 87%]

...Sample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public function LayaSample() { super(); //初始化引擎 Laya.init(1136, 640); var re:Revent = new Revent(); var de:DisEvent = new DisEvent(); } } } Revent类: pack...

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

12. TS版本编译后JS在HTML中顺序错乱,有最简DEMO! [ 85%]

...个类,内部没有任何实现,继承关系分别为如下: class V extends Laya.Sprite {} class W extends V {} class L extends W {} 编译后的index.html中,引入顺序错误,如下:     <!--jsfile--startTag-->     <script src="js/W.js"></script>     &lt...

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

13. LayaAir无法正确识插入别泛型TS代码生成js文件到html中 [ 85%]

...初始化报错了。 子类是这样写的 export class LayaHelper<V extends LayaView<IModel>> extends BasicHelper<LayaView<IModel>> 这样LayaHelper的js文件就在比较前面插入了,而BasicHelper.js就在后面插入了 我改成export class LayaHelper extends Basic...

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

14. 关于位图字体使用问题,参照官方文档,显示不出 [ 85%]

...用问题,参照官方文档,显示不出 export default class AllText extends ui.examples.text.BitmapFontUI   ui.examples.text.BitmapFontUI 找不到继承的类   laya is not define   参见 demo 附件 : --> Test1.rar 2020-11-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

15. 视频节点 · LayaAir3.0文档 · LAYABOX [ 83%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.VideoNode }) public video: Laya.VideoNode; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake()...

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

16. UI滤镜效果 · LayaAir3.0文档 · LAYABOX [ 83%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { // 获得Image组件 @property({ type: Laya.Image }) public img: Laya.Image; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //创建...

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

17. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 83%]

... 下面是一个推荐做法: //Script.ts @Laya.regClass() class Script extends Laya.Script { wantToUseNode() { EditorEnv.scene.runScript("TestSceneScript.visitNode"); } } //TestSceneScript.ts import fs from "fs"; //注意是IEditorEnv.regClass,不是Laya.regClass!! @IEditorEnv.regClass() class ...

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

18. js继承模式 [ 82%]

...type.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p)) && (d[p] = b[p]); } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.pro...

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

19. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 81%]

...Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene {         public scoreLbl:Laya.Label;         public tipLbll:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("test/TestScene"); } } REG("ui...

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

20. 如何拓展材质shader? [ 81%]

...  如何在不改laya.d3 这个类下拓展?   我尝试BlinnPhongExt extends Laya.BlinnPhongMaterial   但在做材质属性拷贝的时候会出现不正确的结果   export default class LayaBlinnPhongExt extends Laya.BlinnPhongMaterial {     public CopyAttribute_ASKLaya(baseMat: Laya....

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