Skip to content

Commit 8b7bf81

Browse files
committed
Re-parent the Bob class.
1 parent 17a8972 commit 8b7bf81

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

v3/src/gameobjects/blitter/Blitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var Blitter = new Class({
6262
frame = this.texture.get(frame);
6363
}
6464

65-
var bob = new Bob(x, y, frame, visible);
65+
var bob = new Bob(this, x, y, frame, visible);
6666

6767
this.children.addAt(bob, index, false);
6868

v3/src/gameobjects/blitter/Bob.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ var Bob = new Class({
44

55
initialize:
66

7-
function Bob (x, y, frame, visible)
7+
function Bob (blitter, x, y, frame, visible)
88
{
9-
// Set by the DisplayList class
10-
this.parent;
9+
this.parent = blitter;
1110

1211
this.x = x;
1312
this.y = y;
@@ -19,7 +18,6 @@ var Bob = new Class({
1918

2019
this.flipX - false;
2120
this.flipY = false;
22-
2321
},
2422

2523
resetFlip: function ()

0 commit comments

Comments
 (0)