大约有 474 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
Laya_社区(255) Laya3.0_api(61) Laya2.0_api(57) laya_api(54) Laya2.0_示例(19) Laya_示例(17) Laya3.0_文档(6) Laya2.0_文档(5)
...s.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches =...
来源: Laya2.0_示例 发布时间: 20251130
...(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress); } function onApePr...
来源: Laya_示例 发布时间: 20251130
...adImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, sc...
来源: Laya_示例 发布时间: 20251130
...后,是否应该立即清除和它互斥的值呢?同样的,anchor和pivot也有同样的问题 2016-07-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: uyaer你好 1、在层级...
来源: Laya_社区 发布时间: 20160706
...pe.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.MOUSE_DOWN, this, this.onApeP...
来源: Laya2.0_示例 发布时间: 20251130
...0, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length...
来源: Laya_示例 发布时间: 20251130
...d(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: 标签事件相对于上个...
来源: Laya2.0_示例 发布时间: 20251130
...s.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches =...
来源: Laya2.0_示例 发布时间: 20251130
...var text = Laya.loader.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matter.Bodies.rectangle(x, y, w, h, { isStatic:true, layaSprite:sp, }); sp = new Laya.Sprite(); w = size/5, h=size; sp.pivot(w/2, h/2); sp.graphics.fillTex...
来源: Laya_社区 发布时间: 20180625
...on = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = Laya.stage.height / 2; button.on(Event.MO...
来源: Laya_示例 发布时间: 20251130