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

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

91. MovieClip is not a constructor [ 72%]

...来自: import Sprite=Laya.Sprite; import MovieClip=Laya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该...

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

92. 物体随着鼠标滑动旋转脚本 [ 72%]

...    this.mainCameraAnimation = null;     this.scene = null; } Laya.class(ObjectRotate, "ObjectRotate", Laya.Script);  //这是什么意思有什么作用 ObjectRotate.prototype._initialize = function (owner) {     var _this = this;     ObjectRotate.__super.prototype._initialize.call...

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

93. 创建laya的视图销毁destroy()清除不了 [ 72%]

...destroy()清除不了 创建laya的视图销毁destroy()清除不了。  class Mail2View extends laya.display.Sprite { private display:ui.mail.mail2UI; constructor(){ super(); this.display = new ui.mail.mail2UI(); this.addChild(this.display); } public destroy():void { this.display.destroy(); this.d...

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

94. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 71%]

...his); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite); //定义RunGame的prototype var _proto = RunGame.prototype; //初始化 _proto.init = function(){ console.log('RunGame Init'); } })(); 此处我们要说一下  Laya.class(RunGa...

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

95. 内嵌模式创建scene,运行时报找不到json文件 [ 71%]

...,并且都是ide自动生成的代码。     export module ui { export class HelloUI extends Scene { public static uiView:any ={"type":"Scene","props":{"width":640,"height":1136},"compId":2,"child":[{"type":"Label","props":{"y":64,"x":214.5,"width":211,"text":"label","styleSkin":"comp/label.png"...

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

96. 请问如何使我的自定义类UIDropBox继承Laya.Sprite? [ 71%]

...fined console.log(this._super);//undefined this.addChild(this.txt); } Laya.class(UIDropBox, "UIDropBox", Sprite); UIDropBox.prototype = { getTextFeild: function () { var text = new Text(); text.overflow = Text.VISIBLE; text.color = "#FFFFFF"; text.fontSize = 20; return text; } } return UIDropBox; })...

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

97. 异步加载一个UI对象时的问题 [ 70%]

...步的。因此我将load方法放到了createChildren函数里面去。 class MyView extends ui.view.MyViewUI { constructor() { super(); } createChildren():void { super.createChildren(); let assets = [ { url: "res/atlas/ui/shared.atlas", type: Loader.ATLAS }, { url: "res/atlas/ui/myview.atlas", typ...

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

98. ja语言怎么样创建一个工具类在其他地方调用 [ 70%]

...nction (_super) { function Load_() { Load_.super(this); } //注册类 Laya.class(Load_, "Load_", _super); var _proto = Load_.prototype; _proto.run_Fast = function () { console.log("逻辑处理"); } return Load_; })(Laya.Sprite);我的代码,但是下面的继承位置Laya.Sprite这里不写会报...

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

99. viewport 的用法 [ 70%]

...#123000');       this.addChild(ccc);       //ccc.x = -30   }  Laya.class(layaSlot,null,Sprite);   代码是这样的 我的想法是 在viewport之外的 应该是不会显示的 在viwport之内显示的应该是会显示的 但是实际上跑出来发现只要设置了这个viewport 这...

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

100. 多行输入文本组件 · LayaAir3.0文档 · LAYABOX [ 70%]

...示。 (动图1-3) (动图1-4) 1.3 脚本控制TextArea const { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * ...

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