大约有 517 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0037 秒)
...接报错了 "Failed to construct 'Worker': Please use the 'new' operator, this DOM object constructor cannot be called as a function." 2018-01-08 0 0 分享 微博 QZONE 微信 fool_tiger 赞同来自: 还要在index.html中写啊,我以为在as3脚本里写就行了? 2018-01-08 0 1 分享 微...
来源: Laya_社区 发布时间: 20180108
...ineRes2/goblins.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...
来源: Laya_示例 发布时间: 20241117
....stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, this.onTextureLoaded)); } onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); this.initMaggots(); Laya.timer.frameLoop(1, this, this.animate); } initMaggots() { let maggotContainer; for (let i = 0; i wb...
来源: Laya2.0_示例 发布时间: 20241117
...ake() { Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, onShake); console.text = '开始接收设备摇动\n'; } function onShake() { shakeCount++; console.text += "设备摇晃了" + shakeCount + "次\n"; if (shakeCount >= 3) { Shake.instance.stop(); console.text += "停止...
来源: Laya_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; let gap = 150; this.ape1 = new Sprite(); Laya.stage.addChild(this.ape1); this.ape1.loadImage(monkey2Path); // 设置轴...
来源: Laya2.0_示例 发布时间: 20241117
..., 10); bmd2.copyPixels(bmd1, rect, pt); var bm1:Bitmap = new Bitmap(bmd1); this.addChild(bm1); var bm2:Bitmap = new Bitmap(bmd2); this.addChild(bm2); bm2.x = 50; trace(rect.width); trace(rect.height); 输出正常,不知道你那边是如何写的?
来源: Laya_社区 发布时间: 20151105
... 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = th...
来源: Laya_社区 发布时间: 20190214
...邀请: 与内容相关的链接 提交 3 个回复 dsk4120 赞同来自: this.pass_layer = this.tiledMap.getLayerByName("pass_layer");//获取通行层 var a = this.pass_layer.getTileData(x, y); var walkable = this.tiledMap.getTileProperties(0, a - 1, "walkable"); if (walkable === 1) { // 可行走...
来源: Laya_社区 发布时间: 20180808
This image has just been released and needs to be restored now 在native运行环境下,打开UI界面时加载的图片资源,在界面关闭时对其做clearTextureRes。 短时间内再次打开该界面就会出现这样的提示。请问这个提示是否有性能影响,该如何避免...
来源: Laya_社区 发布时间: 20181119
...类型资源 Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAssetLoaded1)); // 加载多张png类型资源 Laya.loader.load( ["../../res/apes/monkey0.png", "../../res/apes/monkey1.png", "../../res/apes/monkey2.png"], Handler.create(this, onAssetLoaded2)); })(); function onAsse...
来源: Laya_示例 发布时间: 20241117