大约有 16 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...texture } onAssetLoaded2() { const Loader = Laya.Loader; let pic1 = Loader.getRes("res/apes/monkey0.png"); let pic2 = Loader.getRes("res/apes/monkey1.png"); let pic3 = Loader.getRes("res/apes/monkey2.png"); // 使用资源 } } new Loader_SingleType();module laya { import Loader = Laya.Loader; import...
来源: Laya2.0_示例 发布时间: 20241117
...onAssetsLoaded)); })(); function onAssetsLoaded() { var robotData = Loader.getRes(ROBOT_DATA_PATH); var robotTexture = Loader.getRes(ROBOT_TEXTURE_PATH); // 使用资源 } })();module laya { import Loader = Laya.Loader; import Handler = Laya.Handler; export class Loader_MultipleType { private ROBOT_...
来源: Laya2.0_示例 发布时间: 20241117
....Loader, Templet = Laya.Templet, Event = Laya.Event; let tTexture = Loader.getRes(mTexturePath); let arraybuffer = Loader.getRes(mAniPath); mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.parseData(tTexture, arraybuffer, 10); } parseComplete() { const Event ...
来源: Laya2.0_示例 发布时间: 20241117
...this, this.onAssetsLoaded)); } onAssetsLoaded() { monkey1Res = Laya.loader.getRes(monkey1Str), monkey2Res = Laya.loader.getRes(monkey2Str); this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.switchTextu...
来源: Laya2.0_示例 发布时间: 20241117
...e = 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() { // 创建一个发光滤镜 const GlowFil...
来源: Laya2.0_示例 发布时间: 20241117
...ey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRes(monkey2Path); let ape2 = new Laya.Sprite(); Laya.stage.addChild(ape2); ape2.graphics.drawTexture(monkey2, 100, 0); })); } } new Sprite_DisplayImage();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage...
来源: Laya2.0_示例 发布时间: 20241117
... 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.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos...
来源: Laya2.0_示例 发布时间: 20241117
...adImage(ApePath); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.ape.on(Event.MOUSE_DOWN, this, this.onStartDrag); } showDragRegion() { const ...
来源: Laya2.0_示例 发布时间: 20241117
...ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOU...
来源: Laya2.0_示例 发布时间: 20241117
...let ape = new Sprite(); Laya.stage.addChild(ape); apeTexture = Laya.loader.getRes(apePath); ape.graphics.drawTexture(apeTexture); return ape; } } new Filters_Color();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ColorFilter = Laya.ColorFilter; import Texture = Laya.Tex...
来源: Laya2.0_示例 发布时间: 20241117