大约有 9 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0033 秒)
... - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.MOUSE_UP, this, this.mouseHandler); rect.on(Event.CLICK, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, th...
来源: Laya2.0_示例 发布时间: 20241117
...x(posx, posy, width, height, ratio) { var box = new Sprite(); box.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.addChild(box); box.pos(posx, posy).size(width * ratio, height * ratio); var rigidbody: RigidBody = box.addComponent(RigidBody); rigidbody.category = Physics_Physics_CollisionFilte...
来源: Laya2.0_示例 发布时间: 20241117
....8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApePress); } onApePress(e) { const Event = Laya.Event; // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this, this.onHold); Laya.stage.on(Event.MOUSE_UP, this, th...
来源: Laya2.0_示例 发布时间: 20241117
...ckLength) / 2; this.button.y = Laya.stage.height / 2; this.button.on(Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.addChild(this.button); //左侧临界点设为圆形初始位置 beginPosition = this.button.x; //右侧临界点设置 endPosition = beginPosition + TrackLength; } drawTrack() ...
来源: Laya2.0_示例 发布时间: 20241117
...00"; this.txt.fontSize = 20; this.txt.color = "#ffffff"; this.txt.on(Event.MOUSE_DOWN, this, this.startScrollText); } /* 开始滚动文本 */ startScrollText(e) { const Event = Laya.Event; prevX = this.txt.mouseX; prevY = this.txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.scrollText); Laya...
来源: Laya2.0_示例 发布时间: 20241117
...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 = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - to...
来源: Laya2.0_示例 发布时间: 20241117
...ALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); Stat.show(); } // 创建地图 createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Handler = Laya.Handler, Browser = ...
来源: Laya2.0_示例 发布时间: 20241117
...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 = e.touches; if (touches && touches.length == 2) { lastDistance = this.getDistance(touches); Laya...
来源: Laya2.0_示例 发布时间: 20241117
...; } onListMouse(e, index){ console.log(e.target.name); if (e.type == Event.MOUSE_DOWN) { this.mouseDown = true; //如果单元格已经展开,则先恢复 if (this.itemIsOpen) { this.itemIsOpen = false; this.itemOpenId = -1; Tween.to(this.openedItem, { "x": 0 }, 500, null, Handler.create(this, () ...
来源: Laya2.0_示例 发布时间: 20241117