大约有 285 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0033 秒)
Laya_社区(78) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya2.0_示例(14) Laya_示例(11) Laya3.0_文档(6) Laya2.0_文档(5)
...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_示例 发布时间: 20260106
...示说明。pos是设置坐标位置的,为什么提示机身的描点,pivot()函数才是设置描点的。有点晕 附件 : --> One.rar 2016-07-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying ...
来源: Laya_社区 发布时间: 20160729
...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_示例 发布时间: 20260106
...(); 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_示例 发布时间: 20260106
...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_示例 发布时间: 20260106
...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_示例 发布时间: 20260106
...造我酱紫有没有表达清楚。 直接说解决方法吧:通过pivot()调整位置(需要注意pivot的x,y与,普通的x,y的坐标轴中心点位置不一样,这个详情可以参考API) 换一种理解思路大概就是:pos()调整的x,y相当于用pading去调整元素位...
来源: Laya_社区 发布时间: 20180810
...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_示例 发布时间: 20260106
...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_示例 发布时间: 20260106
...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_示例 发布时间: 20260106