ekmomo 发表于 2018-7-28 22:06 老哥 新手 啊 能知道 能用鼠标做出来也不容易啊 你能说清楚点不我找了找PIXI里的文件 只发现了个这个 InteractionManager.prototype.onPointerOver = function onPointerOver(originalEvent) { var events = this.normalizeToPointerData(originalEvent); // Only mouse and pointer can call onPointerOver, so events will always be length 1 var event = events[0]; var interactionData = this.getInteractionDataForPointerId(event); var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); interactionEvent.data.originalEvent = event; if (event.pointerType === 'mouse') { this.mouseOverRenderer = true; } this.emit('pointerover', interactionEvent); if (event.pointerType === 'mouse' || event.pointerType === 'pen') { this.emit('mouseover', interactionEvent); } }; |
请自行百度pixi事件,做停留需要获取鼠标位置吗… |
TouchInput.x 脚本获取鼠标位置X TouchInput.Y 脚本获取鼠标位置Y |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-1-25 16:45
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.