大约有 8 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0022 秒)
...png"; // 方法1:使用loadImage let ape = new Laya.Sprite(); Laya.stage.addChild(ape); ape.loadImage(monkey1Path); // 方法2:使用drawTexture Laya.loader.load(monkey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRes(monkey2Path); let ape2 = new Laya.Sprite(); Laya...
来源: Laya2.0_示例 发布时间: 20251130
...pass() { const Sprite = Laya.Sprite; compassImg = new Sprite(); Laya.stage.addChild(compassImg); compassImg.loadImage(compassImgPath); compassImg.pivot(compassImg.width / 2, compassImg.height / 2); compassImg.pos(Laya.stage.width / 2, 400); } createDirectionIndicator() { const Sprite = Laya.Sprite; ...
来源: Laya2.0_示例 发布时间: 20251130
...器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Event.MOUSE_DOWN, this, this.onDown); } createDeepSkyblueRect() { const Sprite = Laya.Sprite, Event = Laya.Event; let deepSkyblueRect = new Sprite(); deepSkyblueRect.graphics.drawRect(0, 0, 10...
来源: Laya2.0_示例 发布时间: 20251130
...ya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this.aniFly.loadAtlas(PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); // 创建按钮 this.btn = new Sprite().size...
来源: Laya2.0_示例 发布时间: 20251130
...reshLoading.bottom = 10; this.refreshLoading.visible = false; this.baseBox.addChild(this.refreshLoading); // 加载动画 this.loadingAni = new Animation(); this.loadingAni.loadAnimation("res/ui/refreshList/ani/Refresh.ani"); this.loadingAni.pos(27, 36); this.loadingAni.autoPlay = true; this.refresh...
来源: Laya2.0_示例 发布时间: 20251130
...猩在舞台上,另一只被添加成第一只猩猩的子级 Laya.stage.addChild(this.ape1); this.ape1.addChild(this.ape2); Laya.timer.frameLoop(1, this, this.animate); } animate() { this.ape1.rotation += 2; this.ape2.rotation -= 4; } } new Sprite_NodeControl();module laya { import Sprite = Laya....
来源: Laya2.0_示例 发布时间: 20251130
...s.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; let rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标签 this.showLabel("邮箱", 0, rowHeightDelta * 0); this.showLabel("出生日期", 0, r...
来源: Laya2.0_示例 发布时间: 20251130
...= 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.switchTexture(); this.ape.on(Laya.Event.CLICK, this, this.switchTexture); } switchTexture() { let monkey = (this.flag...
来源: Laya2.0_示例 发布时间: 20251130