大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + g...
来源: Laya2.0_示例 发布时间: 20251130
..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.drawSomething(); } private drawSomething(): void { this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画线 this.sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 this.sp.graphics.drawLines(176...
来源: Laya_示例 发布时间: 20251130
...age.bgColor = "#232628"; Laya.loader.load(aniConfPath, Laya.Handler.create(this, this.createAnimation), null, Laya.Loader.ATLAS); } createAnimation() { const Animation = Laya.Animation; let ani = new Animation(); Laya.stage.addChild(ani); ani.loadAtlas(aniConfPath); // 加载图集动画 ani.interva...
来源: Laya2.0_示例 发布时间: 20251130
...件? parent加载了child1,child2,child3, parent.on(Event.MOUSE_DOWN, this, function(){ trace("parent被点击了!"); }); 其中child1,child2,child3都是load图片的Sprite,为何parent(它也是个Sprite)识别不到鼠标事件? 2017-03-12 添加评论 免费帖 --> 分享 ...
来源: Laya_社区 发布时间: 20170312
...ture Laya.stage.loadImage("res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, this.animate); } animate() { const Sprite = Laya.Sprite, Point = Laya.Point; let laser; if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions laser = new Sprite(); laser.loadImage("res/...
来源: Laya2.0_示例 发布时间: 20251130
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; let vGap = 100; this.button1 = this.createButton("点我3秒之后 alpha - 0.5"); this.button1.x = (Laya.stage.width - this.button1.width) / 2; this.button1.y = (Laya.stage....
来源: Laya2.0_示例 发布时间: 20251130
...g", "../../res/ui/vscroll$up.png"); Laya.loader.load(skins, Handler.create(this, onSkinLoadComplete)); })(); function onSkinLoadComplete() { placeHScroller(); placeVScroller(); } function placeHScroller() { var hs = new HScrollBar(); hs.skin = "../../res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 1...
来源: Laya_示例 发布时间: 20251130
...ya.stage.bgColor = "#232628"; Laya.loader.load(assets, Laya.Handler.create(this, this.ShowContent)); } ShowContent() { const FontClip = Laya.FontClip; var clipnum= new FontClip(assets[0]); var fontClip = new FontClip(assets[1]); var TestFontClip = new FontClip(assets[1]); var TestClipNum = new FontC...
来源: Laya2.0_示例 发布时间: 20251130
...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); } private function setup(e:*=null):void { normalizeApe(); makeRedApe(); grayingApe(); } private function normalizeApe():void { var originalApe:Sprite = createApe(); apeTexture = Laya.loader.getRes(ApePath); ori...
来源: Laya2.0_文档 发布时间: 20210715
..."#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createController(); } showBg() { const Image = Laya.Image; let bg = new Image(bgSkin); bg.size(224, 302);...
来源: Laya2.0_示例 发布时间: 20251130