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

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

181. 骨骼动画-橡胶人 [ 87%]

... = mStartX; mArmature.y = mStartY; //mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNum()) { mCurrIndex = 0; } mArmature...

来源: Laya_示例 发布时间: 20251130

182. 滤镜-模糊滤镜 [ 87%]

...ateApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter...

来源: Laya2.0_示例 发布时间: 20251130

183. UI-ProgressBar [ 87%]

...,5,5"; progressBar.changeHandler = new Handler(this, onChange); Laya.stage.addChild(progressBar); Laya.timer.loop(100, this, changeValue); } function changeValue() { if (progressBar.value >= 1) progressBar.value = 0; progressBar.value += 0.05; } function onChange(value) { console.log("进度:" + M...

来源: Laya_示例 发布时间: 20251130

184. 阻止点击穿透问题 [ 87%]

...alpha = 0.8; bg.graphics.drawRect(0,0,W,H,"#000000"); this.prizeAlertLayer.addChild(bg); this.prizeAlertLayer.addChild(Main.items["prizeinfo"]); Laya.stage.addChild(this.prizeAlertLayer);   this.prizeAlertLayer.visible = false; 附件 : --> 2018-06-01 1 条评论 免费帖 --> 分享 微博 QZONE ...

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

185. 微信小游戏默认项目代码添加unity导出.lh文件,微信开发工具提示错误 [ 87%]

...统计信息 // Laya.Stat.show(); //添加3D场景 this.scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; //添加照相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))) as Laya.Camera; this.camera.transform.translate(new Laya.Vector3(0, 3, 3)); this.camera.transform.r...

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

186. 骨骼动画-藤蔓 [ 87%]

...装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); mArmature.scale(0.5, 0.5); mArmature.on(Event.STOPPED, this, this.completeHandler); this.play(); } completeHandler() { this.play(); } play() { mCurrIndex++; let aniNum = mA...

来源: Laya2.0_示例 发布时间: 20251130

187. 加载不了模型 [ 87%]

...at.show();         //添加3D场景         var scene = Laya.stage.addChild(new Laya.Scene());         //添加照相机         var camera = (scene.addChild(new Laya.Camera(0, 0.1, 10000)));         camera.transform.translate(new Laya.Vector3(0, 5, 5));         camera.transf...

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

188. 骨骼动画-橡胶人 [ 87%]

...装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); // mArmature.scale(0.5, 0.5); mArmature.on(Event.STOPPED, this, this.completeHandler); this.play(); } completeHandler() { this.play(); } play() { mCurrIndex++; let aniNum =...

来源: Laya2.0_示例 发布时间: 20251130

189. 为什么会出现报错 ani not found:ufo1_down [ 87%]

...悲剧 this.bg = new BackGround(); // 把背景添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化...

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

190. 鼠标交互-自定义事件 [ 87%]

.../ 2; this.sp.y = Laya.stage.height / 2; this.sp.size(200, 200); Laya.stage.addChild(this.sp); this.sp.on(ROTATE, this, this.onRotate); // 侦听自定义的事件 this.sp.on(Event.CLICK, this, this.onSpriteClick); } onSpriteClick(e) { let randomAngle = Math.random() * 180; //发送自定义事件 th...

来源: Laya2.0_示例 发布时间: 20251130