mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added inheritance to last moved Item
This commit is contained in:
parent
38b5023410
commit
2a4327c5cf
2 changed files with 33 additions and 5 deletions
|
|
@ -60,13 +60,9 @@ function (Parent, Box2D, Settings) {
|
|||
|
||||
fixtureDef.isSensor = false;
|
||||
|
||||
/*
|
||||
fixtureDef.userData = {
|
||||
onCollisionChange: function(isColliding, fixture) {
|
||||
self.onFixtureWithinReach(isColliding, "right", fixture);
|
||||
}
|
||||
onCollisionChange: this.onCollisionChange.bind(this)
|
||||
}
|
||||
*/
|
||||
|
||||
this.body.CreateFixture(fixtureDef);
|
||||
}
|
||||
|
|
@ -84,6 +80,10 @@ function (Parent, Box2D, Settings) {
|
|||
Item.prototype.beingReleased = function(player) {
|
||||
// overwrite if necessary
|
||||
};
|
||||
|
||||
Item.prototype.onCollisionChange = function(isColliding, fixture, info) {
|
||||
// overwrite if necessary
|
||||
};
|
||||
|
||||
return Item;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue