大约有 1,492 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0046 秒)
...t = 0; for(var i:int=0; i<200; i++) { for(var j:int=0; j<100; j++) { if(count == 10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); b.graphics.drawTexture(texture); a.graphics.clear(true); a.destroy...
来源: Laya_社区 发布时间: 20181113
...改了那么几句代码,就出问题了,问题代码是BoneSlot.as的 if (currTexture && !Render.isConchApp && currDisplayData.type == 0 && currDisplayData.uvs) { currTexture = currDisplayData.c...
来源: Laya_社区 发布时间: 20180130
... console.log(_fish.x, _fish.y, _fish.width, _fish.height, _fish.rotation); if (_fish.hitTestPoint(_fish.x, _fish.y)) { console.log("hittttttt"); } }); } } //程序入口 Laya.init(600, 400); this.onLoaded() function onLoaded(): void { //实例UI界面 var testUI: FishPonds = new FishPonds(); Laya.st...
来源: Laya_社区 发布时间: 20180315
...lear(this,delete_); delete_desktop(1); } function delete_desktop(cut_out){ if(cut_out==1){ delete_majian() }; }; function delete_majian(){ game.bottom.removeChild(game.bottom.getChildAt(0)); // console.log(game.bottom.getChildAt(0)); }; Laya_Aaron • 2018-02-27 16:19 你用loop 删除东西是要...
来源: Laya_社区 发布时间: 20180227
...始游戏,通过激活本脚本方式开始游戏*/ startGame(): void { if (!this._started) { this._started = true; this.enabled = true; } var ground=this.owner.getChildByName("ground"); //****新增代码*****, ground.addComponent(Laya.ChainCollider); ...
来源: Laya_社区 发布时间: 20181130
...比较烦躁 * 我的做法是建一个ts: ``` var Matter; var require; if(typeof require != 'undefined') // 之所以加这个判断是保证在laya这边也正常运行不保错 { Matter = require("./matter.js"); } ``` 然后index.html中在所有之前导入(因为laya会根据index.html顺序...
来源: Laya_社区 发布时间: 20180516
...ani.interval = (35 / speed) > 60 ? 60 : (35 / speed); ani.alpha = speed if ((cur_time / play_time) > 1) { return true; } else { return false; } } ``` 这里的update函数,delta是每一帧的时间,我去动态的改变ani的interval。这样做在1.7.6里面是没问题的。 qian • 20...
来源: Laya_社区 发布时间: 20180115
...() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this.DEF_SIZE >> 1,-90,this.startY,'#ff0000')...
来源: Laya_社区 发布时间: 20180123
... Physics.rayCast(ray2, rayCastHit2, 300); if(rayCastHit2.sprite3D) { //这里取碰撞点的y值给角色重新赋值 var currPosition:Vector3 = new Vector3(_position.x, rayCastHit2.position.y, _position.z); roleModel.transform.po...
来源: Laya_社区 发布时间: 20170828
...h = Laya.Browser.clientWidth; var stageHeight = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log("one", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; //1 console.log("one1", Laya.stage.scaleMode) } else { console.log("two", Laya.stage.scaleMode) Laya...
来源: Laya_社区 发布时间: 20170920