大约有 2,033 项符合查询结果, 库内数据总量为 31,624 项。 (搜索耗时: 0.0071 秒)
Laya_社区(1424) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(44) Laya2.0_api(7) laya_api(6)
Sprite的destroy destroyChildren() { if (this._children) { for (var i = 0, n = this._children.length; i < n; i++) { this._children[0].destroy(true); } } 这几行代码来自laya.core.js的12544行开始的,for循环里的this._children[0]是不是应该是this._children[i]?还是我的使用...
来源: Laya_社区 发布时间: 20200421
...", type: Laya.Loader.FONT }); Laya.loader.load(assets, Laya.Handler.create(this, onAssetsLoaded)); function onAssetsLoaded(){ var bitmapFont = new Laya.BitmapFont(); bitmapFont.loadFont("res/fontWord.fnt"); //必出错 } 只要使用 Laya.Loader.FONT 必出错 难道是要改成 Laya.Loade...
来源: Laya_社区 发布时间: 20170329
LoginView.super(this);这样调用的父类的构造函数的方法,不能用吗 LoginView.super(this);这是在教学视频里用的方法,好像不能用了。 这些layaair中特别的语法规则在哪里统一可以找到 var LoginView = function () { LoginView.super(this); t...
来源: Laya_社区 发布时间: 20170317
...aya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置材质纹理 material.albedoTexture = texture; })); earth2.meshRenderer.material = material; ``` (图4) ##### 法线贴图 **Normal maps(法线贴图)**是一个灰度图,可...
来源: Laya2.0_文档 发布时间: 20210715
...start.json", type: Loader.ATLAS}); Laya.loader.load(assets, Handler.create(this, this.onComplete)); } private onComplete(): void { } } new GameMain(); ================================================================================================ json文件和代码都贴上来了 2017-03-29 添...
来源: Laya_社区 发布时间: 20170329
...age.addChild(ape); ape.loadImage(img,360, 300, 60, 60, Laya.Handler.create(this, function(){ ape.on(Laya.Event.CLICK, this, function(){ console.log(111) }) }));使用这段代码加载了一个60x60大小的图片(下图中骑马的那个人物),并且在加载完...
来源: Laya_社区 发布时间: 20180609
Sprite loadImage 的时候出现多张图片同时显示 this.img.graphics.clear(); var imgUrl = (this.flag = !this.flag)? this.imgUrl1 :this.imgUrl2; this.img.loadImage(imgUrl,100,50); 简单的点击sprite切换图片,结果会出现两张图片同时显示的情况 附件 : --> 2018-04-04 添...
来源: Laya_社区 发布时间: 20180404
...owSprite() { Laya.loader.load("../src/img/testImg.png",Laya.Handler.create(this,graphicsImg)); } function graphicsImg() { //临时sprite var img = new Laya.Sprite(); //img.graphics.drawTexture(Laya.loader.getRes(("../src/img/testImg.png"),0,0)); //获取图片资源 var tex = Laya.loader.getRes("../...
来源: Laya_社区 发布时间: 20180413
...ap; private sp:Laya.Sprite; constructor(){ console.info("start"); this.init(); } init():void{ Laya.init(800, 700, Laya.WebGL); Laya.loader.load("res/atlas/images.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); } onLoaded(){ console.info("onLoaded"); th...
来源: Laya_社区 发布时间: 20171125
... bg = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path); this.addChild(bg); bg.x = 0; bg.y = 0; var bg2:Sprite = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path); bg2.x = 0; ...
来源: Laya_社区 发布时间: 20161223