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

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

61. 音频节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...下面给出一个示例代码,实现脚本控制SoundNode: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.SoundNode }) public sound: Laya.SoundNode; constructor() { super(); } /** * 组件被...

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

62. "Background is not defined"怎么会没定义呢???求救 [ 76%]

... this.bg1.loadImage("res/background.png"); this.addChild(this.bg1); } Laya.class(Background,"Background",_super); window.Background=Background; return Background; })(Laya.Sprite); 2017-04-20 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人...

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

63. 想用js写一个什么也不继承的类,但每次实例化这个类的时候会报错,是不是这个类写得不对呀 [ 76%]

...);         console.log("执行测试构造函数"); } //注册类 Laya.class(Test,"Test",_super); //获取执行域 var _proto = Test.prototype; //_proto. return Test; })(); 2018-06-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

64. TypeScript语法问题,泛型 [ 76%]

...但是写了很多遍没成功,有人会吗?下面是C#代码 public class Class1<T> where T : class, new() { private static T instance; public static T GetInstence() { if (null == instance) { instance = new T(); } return instance; } } 这样我在其他地方,继承Class1,就可以直...

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

65. 官方视频教程中飞机大战 "this.addChild is not a function" [ 76%]

... this.bg1.loadImage("war/background.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.Sprite);报错 "TypeError: this.addChild is not a function    at BackGround (file:///D:/test/laya/myLaya/src/BackGround.js:6:14)    at Game (file:///D:/tes...

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

66. @regClass编译报错! [ 76%]

@regClass编译报错! 去掉CtrBase里的@regClass 就不报错! 再或者CtrBase 不引用funzzzzz 或者 funzzzzz不引用MachineCtrl 也不会报错。已经是最精简的就三个类,每个一行代码。上网查 升级了webpack也没用。   写了构造函数也没用 bundle编译...

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

67. 关于环形进度条,进度不能重置问题 [ 76%]

...say.width/2, "#00ffff"); this.circle.blendMode = "destination-out"; } Laya.class(IndexView,"IndexView",_super); IndexView.prototype.loadProgress = function(){ this.box.addChild(this.circle); if(this.angle <= 360){ this.angle+=12; this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, thi...

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

68. ts项目 模块问题 [ 76%]

ts项目 模块问题 b文件写了个class ,怎么在a文件new class? export 显示未定义,require也用不了   //b文件 export default class player extends Laya.Sprite { constructor() { super(); this.pivot(this.width / 2, this.height / 2); this.graphics.drawRect(0, 0, this._size, this...

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

69. LAYA的AS3项目碰见个问题,求解 [ 76%]

...ntSize="12" editorInfo="compId=2"/> </View>   mytexts.as: public class myTexts extends myTextsUI        public function myTexts()         {             super();         }         override protected function initialize():void         {           ...

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

70. 感觉实例之间是关联的,求指教。(已解决) [ 75%]

...super) { function Panel1() { Panel1.super(this); //this.poke_a.x=0; } Laya.class(Panel1, "Panel1", _super); var _proto = Panel1.prototype; //======================================= //将指定的牌显示到桌面上 //======================================= _proto.start = function () { var tempRetu...

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