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

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

41. 程序蓝图 · LayaAir3.0文档 · LAYABOX [ 81%]

...编辑器中。 3.1 类 需要在类定义之前使用装饰器的标识@bpClass,示例代码如下所示: const { bpClass } = BP; @bpClass({ name:"TestBluePrint", canInherited: true, extends:"Script" }) export class TestBluePrint extends Laya.Script { } 需要注意的是,只有注册了构...

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

42. 加载UI为什么总是加载白底 [ 81%]

...var start = (function(_super){ function start(){ start.super(this); } Laya.class(start,"start",_super); //var _proto = Game.prototype; return start; })(ui.startUI) 2018-12-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 ...

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

43. 新手,图片加载不进去,没有报错。很疑问 [ 81%]

...rite(); this.bg1.loadImage("comp/bg.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.Sprite)代码我这样写可以正常显示,你试试 2017-02-22 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请...

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

44. 【简单跑酷--JS版】---Lv.3 添加地板 [ 80%]

....__super.call(this); } //Floor 是一个显示对象 继承此 Sprite Laya.class(Floor, "Floor", laya.display.Sprite); var _proto = Floor.prototype; _proto.init = function(type){ //创建一个帧循环处理函数 Laya.timer.frameLoop(1, this, this.onLoop); } //在地板上面添加物品 _proto.ad...

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

45. 不能成功调用 DiaLog Close 关闭方法 [ 80%]

...ck); // 初始化 UI 界面显示 this.reset(); } // 注册 Start 类 Laya.class(Start,"Start",_super); var _proto = Start.prototype; // 初始化 UI 界面显示 _proto.reset = function(){ } _proto.onBeginClick = function(){ dialog.close(); restart(); } _proto.onLinkClick = function(){ alert("***")...

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

46. 新手学js做开发,写了一个按钮,点击没有反应 [ 80%]

...on LoginView(){         LoginView.super(this);     }     Laya.class(LoginView,"LoginView",_super);     return LoginView; })(ui.LoginUI);   2018-01-30 0 0 分享 微博 QZONE 微信 sky_summer 赞同来自: 我是根据视频上学的(如下截图),我对照了一下,他这...

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

47. 自定义组件时,设置组件子节点的image的skin时,路径为layaIde的路径而非项目路径 [ 80%]

...I.Button; import laya.ui.Image; /** * ... * @author Caixiansheng */ public class HProgressSlider extends HSlider { /**@private */ protected var _progress:Image protected var _proMask:Sprite; public function HProgressSlider(skin:String=null) { super(skin); } override protected function initialize():v...

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

48. 获取sprite对象的 width和height为0 [ 80%]

获取sprite对象的 width和height为0  /** * 船 */ 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 { //背景图 ...

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

49. 关于LAYA TS重写X和Y坐标的问题 [ 79%]

... 因为AS3可以super.x super.y 打个比方 假设在LAYA TS 里这么写 class XXX extends Sprite { public set x(value:number) { this._x = value; } public get x():number { return this._x; } } 这样写在WEB环境下固然可行 但是却会导致打包坐标不生效 而在AS3就不一样了 可...

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

50. 官方的示例贴上来,怎么没反映啊 [ 79%]

...ndler(data) { alert(2); } function completeHandler(e) { alert(1); } } Laya.class(JiHuo, "ui.JiHuo", _super); return JiHuo; })(ui.JiHuoUI); 2018-04-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 w1114367261 赞...

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