From 5f0f32818b054a3118003922eead633d9155d909 Mon Sep 17 00:00:00 2001 From: mumuy Date: Wed, 6 Jul 2022 19:22:18 +0800 Subject: [PATCH] =?UTF-8?q?updated=20=E6=B7=BB=E5=8A=A0=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game.js | 38 +++++++++++++++++++------------------- index.js | 16 +++++++++++----- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/game.js b/game.js index 1c706cf..0e2489e 100644 --- a/game.js +++ b/game.js @@ -84,19 +84,19 @@ function Game(id,params){ Item.prototype.bind = function(eventType,callback){ if(!_events[eventType]){ _events[eventType] = {}; - $canvas.addEventListener(eventType,function(e){ - var position = _.getPosition(e); - _stages[_index].items.forEach(function(item){ - if(Math.abs(position.x-item.x)