Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 728b2e2

Browse files
filbertteoryan-roemer
authored andcommitted
fixed minor native bugs (#57)
1 parent c1088c8 commit 728b2e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/native/utils/game-loop.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export default class GameLoop {
22
constructor() {
33
this.subscribers = [];
44
this.loopID = null;
5+
this.loop = this.loop.bind(this);
56
}
67

78
start() {
@@ -22,7 +23,7 @@ export default class GameLoop {
2223
}
2324

2425
unsubscribe(id) {
25-
this.subscribers.splice((id - 1), 1);
26+
delete this.subscribers[id - 1];
2627
}
2728

2829
loop() {

0 commit comments

Comments
 (0)