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

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

81. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 78%]

...ddChild(over); } hero类: (function() { function Hero(type, hp) { Hero.__super.call(this); this.fly(); } Laya.class(Hero,"Hero", Air); var _proto = Hero.prototype; _proto.fly = function() { this.playAction("fly") } })(); air类: (function() { function Air(type, hp) { this.hp = hp; this.type = ty...

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

82. 获取sprite对象的 width和height为0 [ 78%]

.../ class Boat extends Laya.Sprite { private bt:Laya.Sprite; constructor() { super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 private bg:Laya.Sprite; constructor(){ super(); this.in...

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

83. 一个场景,两个线形碰撞体,出错 [ 78%]

...is.label = (this.label || "ChainCollider");             return super.getDef();         }   改成这样既可 2018-11-19 0 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 下个版本修复,    chaincollider的  方法    override protected function getDef():* {  ...

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

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

...ends 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.display.removeSelf(); super.destroy(); } }就是这段简单的测试代码,怎么销毁,...

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

85. 新手,如何看懂官方代码? [ 78%]

...官方代码? 例如:官方脚本CameraMoveScript.js CameraMoveScript.super(this);这句什么意思?super这东西哪来的?我要怎么查到它的用法? this.lastMouseX = NaN;为什么用this,而不是var lastMouseX = NaN; CameraMoveScript.prototype._update = function (state){...}像...

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

86. 基础使用与构成 · LayaAir3.4 · 引擎文档 · LAYABOX [ 78%]

...aya; @regClass() export class Script extends ItemBoxBase { constructor() { super(); } get dataSource(): any { return super.dataSource; } set dataSource(value: any) { super.dataSource = value; if (!value) return; //把数据源里的值,给到子节点属性 if (value.avatar) { let redHot = this.ge...

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

87. Laya api 中可能的bug [官方来看] [ 78%]

...n(context,x,y){ var childs=this._childs; this._childs=this._showGridList; _super.prototype.render.call(this,context,x,y); this._childs=childs; }2.core中Sprite的zorder的set方法中 有一行代码有疑似bug,麻烦官方帮忙确认 /**z排序,更改此值,则会按照值的大小对同一...

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

88. 报错,这不是个构造函数 "StartPage is not a constructor" [ 77%]

...ctor" StartPage: /**Created by the LayaAirIDE*/ var StartPage=(function(_super){ function StartPage(){ StartPage.__super.call(this); } Laya.class(StartPage,'view.StartPage',_super); return StartPage; })(StartPageUI) LayaSample: var LayaSample = (function(){ (function(){ Laya.init(667,375); Laya....

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

89. 分享:关于自定义场景继承的实现 [ 77%]

... namespace base{ export class BaseScene extends Laya.Scene{ constructor(){ super(); console.log('BaseScene:我是基类BaseScene,我的子类是导出类,我的父类是场景类'); } } } 导出UI 导出后layaMaxUI.ts的内容如下/**This class is automatically generated by LayaAirIDE, please do...

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

90. 有关ui的问题 [ 77%]

... 1 个回复 明天当男神 赞同来自: var TestScene = (function (_super) {     function TestScene() {         TestScene.super(this);     }     Laya.class(TestScene,"TestScene",_super);       return TestScene; }(ui.TestViewUI));   1.1创建好ui后,导出,再自己创建个...

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