Skip to content

Commit 0fb0c09

Browse files
committed
Removed inner loop
1 parent 30d80bb commit 0fb0c09

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

src/input/InputPlugin.js

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,34 +1688,31 @@ var InputPlugin = new Class({
16881688
var gameObject = previouslyOver[i];
16891689

16901690
// Call onOut for everything in the previouslyOver array
1691-
for (i = 0; i < total; i++)
1692-
{
1693-
gameObject = previouslyOver[i];
1691+
gameObject = previouslyOver[i];
16941692

1695-
if (!gameObject.input)
1696-
{
1697-
continue;
1698-
}
1693+
if (!gameObject.input)
1694+
{
1695+
continue;
1696+
}
16991697

1700-
manager.resetCursor(gameObject.input);
1698+
manager.resetCursor(gameObject.input);
17011699

1702-
gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);
1700+
gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);
17031701

1704-
totalInteracted++;
1702+
totalInteracted++;
17051703

1706-
if (_eventData.cancelled || !gameObject.input)
1707-
{
1708-
aborted = true;
1709-
break;
1710-
}
1704+
if (_eventData.cancelled || !gameObject.input)
1705+
{
1706+
aborted = true;
1707+
break;
1708+
}
17111709

1712-
this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);
1710+
this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);
17131711

1714-
if (_eventData.cancelled || !gameObject.input)
1715-
{
1716-
aborted = true;
1717-
break;
1718-
}
1712+
if (_eventData.cancelled || !gameObject.input)
1713+
{
1714+
aborted = true;
1715+
break;
17191716
}
17201717

17211718
if (!aborted)

0 commit comments

Comments
 (0)