大约有 13 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0023 秒)
...hold Laya.timer.once(HOLD_TRIGGER_TIME, this, onHold); Laya.stage.on(Event.MOUSE_UP, this, onApeRelease); } function onHold() { Tween.to(ape, { "scaleX": 1, "scaleY": 1 }, 500, Ease.bounceOut); isApeHold = true; } /** 鼠标放开后停止hold */ function onApeRelease() { // 鼠标放开时,如果...
来源: Laya_示例 发布时间: 20241118
...E_MOVE, this, onMouseMove); buttonPosition = button.x; Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } /**移到事件处理*/ function onMouseMove(e) { button.x = Math.max(Math.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起事件...
来源: Laya_示例 发布时间: 20241118
...eY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText); } /* 停止滚动文本 */ function finishScrollText(e) { Laya.stage.off(Event.MOUSE_MOVE, this, scrollText); Laya.stage.off(Event.MOUSE_UP, this, finishScrollText); } /* 鼠标滚动文本 ...
来源: Laya_示例 发布时间: 20241118
...鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event.RIGHT_CLICK, this, mouseHandler); r...
来源: Laya_示例 发布时间: 20241118
...p(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图 function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的时候调用destory销毁地图 tiledMap.createMap("../../res/tiledM...
来源: Laya_示例 发布时间: 20241118
...28"; setup(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h /...
来源: Laya_示例 发布时间: 20241118
...28"; setup(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 300, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h /...
来源: Laya_示例 发布时间: 20241118
...(20, 160); Laya.stage.addChild(this.btn); //添加侦听 this.btn.on(Event.MOUSE_UP, this, this.onMouseUp); }; /** * 鼠标事件响应函数 * @param evt */ GameMain.prototype.onMouseUp = function (evt) { if (this.isDestroyed) { //通过设置 visible=true ,来触发渲染,然后引擎会自动...
来源: Laya_示例 发布时间: 20241118
...et = new Laya.Vector3(0, 0.25, 0); //鼠标事件 Laya.stage.on(Laya.Event.MOUSE_UP, this, function () { if (_outHitInfo.distance !== -1) { var sphere = scene.addChild(new Laya.MeshSprite3D(new Laya.SphereMesh(0.25, 16, 16))); var mat = new Laya.StandardMaterial(); mat.diffuseTexture = Laya.Texture2...
来源: Laya_示例 发布时间: 20241118
...ollider.active = false; //是否开启debug模式 Laya.stage.on(Laya.Event.MOUSE_UP, this, drawCollider); } function onKeyDown(e) { if (e.keyCode == Laya.Keyboard.UP) this.layaMonkey.transform.translate(this._tempUnitX1); else if (e.keyCode == Laya.Keyboard.DOWN) this.layaMonkey.transform.translate(...
来源: Laya_示例 发布时间: 20241118