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

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

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

...rite = Laya.Sprite; var Text = Laya.Text; function UIDropBox() { UIDropBox.super(this); this.txt = this.getTextFeild(); this.txt.y = 50; this.txt.text = 'aasassa'; console.log(this.addChild);//undefined console.log(this._super);//undefined this.addChild(this.txt); } Laya.class(UIDropBox, "UIDropBox"...

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

72. CameraMoveScript.as在哪儿下载群里的有错 [ 79%]

...veScript() { } override public function _initialize(owner:Sprite3D):void { super._initialize(owner); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); Laya.stage.on(Event.MOUSE_OUT, this, mouseOut); var camera:BaseCamera = owner.scene.currentCamera; 没...

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

73. Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件? [ 79%]

...ist":["comp/button.png"],"loadList3D":[]};         constructor(){ super()}         createChildren():void {             super.createChildren();             this.createView(GameSceneuiUI.uiView);         }     }     REG("ui.GameSceneuiUI",GameS...

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

74. 自定义UI导致编辑器无显示 [ 79%]

... • 2017-02-06 16:57 我现在js这样写的: var LabelAtlas=(function(_super){ function LabelAtlas(url,clipX,clipY){ LabelAtlas.__super.call(this); (clipX===void 0)&& (clipX=1); (clipY===void 0)&& (clipY=1); this._clipX=clipX; this._clipY=clipY; this.skin=url; } __class(LabelAtla...

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

75. HTMLDIVElement设置innerHTML时报错 [ 79%]

...ion(){ if (this._width)return this._width; return this.contextWidth; },[b]_super.prototype._$set_width[/b]);此次出问题的版本为/** *获取对象的宽 */ __getset(0,__proto,'width',function(){ if (this._width)return this._width; return this.contextWidth; },[b]function(value){ var changed=fal...

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

76. 针对2.0.0 beta5 setLoadingPage 做增强 [ 79%]

.../loadPage' export default class page1 extends Laya.Scene { constructor() { super() } onEnable() { // 预加载loadPage let loadPage = new LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方式 查看效果不同 loadPage.openSce...

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

77. js继承模式 [ 78%]

...on() { Laya.class(Class, className, Laya.Sprite); function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProp...

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

78. [临时解决]bug?加载sk问题 [ 78%]

...概就是下面这样 // Test01是ui的逻辑类 var Test01 = (function (_super) {     function Test01() {         Test01.__super.call(this);// 调试用,看看过了多少帧,才就绪         this.numPreloadCalls = 0; // 执行预加载         this.preload(this.onP...

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

79. 想绘制一个自适应得圆角矩形框,失败了,求解惑 [ 78%]

...自适应得圆角矩形框,失败了,求解惑 var login = (function(_super){ function login(){ login.super(this); var stageWidth = Laya.stage.width; var stageHeight = Laya.stage.height; console.log(stageWidth*0.05+":"+stageHeight); var path = [ ["moveTo",stageWidth*0.05,0], ["actTo",stageWidth...

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

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

...代码(function () { /** * 游戏入口 */ function RunGame(){ RunGame.__super.call(this); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite); //定义RunGame的prototype var _proto = RunGame.prototype; //初始化 _proto.init = functio...

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