You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/physics/Body.js
+99-17Lines changed: 99 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -70,51 +70,126 @@ Phaser.Physics.Body = function (game, sprite, x, y, mass) {
70
70
*/
71
71
this.collideWorldBounds=true;
72
72
73
+
/**
74
+
* @property {Phaser.Signal} onImpact - Dispatched when the shape/s of this Body impact with another. The event will be sent 2 parameters, this Body and the impact Body.
75
+
*/
76
+
this.onImpact=newPhaser.Signal();
77
+
73
78
/**
74
79
* @property {array} collidesWith - Array of CollisionGroups that this Bodies shapes collide with.
75
80
* @private
76
81
*/
77
82
this.collidesWith=[];
78
83
84
+
/**
85
+
* @property {array} _bodyCallbacks - Array of Body callbacks.
86
+
* @private
87
+
*/
88
+
this._bodyCallbacks=[];
79
89
90
+
/**
91
+
* @property {array} _bodyCallbackContext - Array of Body callback contexts.
92
+
* @private
93
+
*/
94
+
this._bodyCallbackContext=[];
80
95
81
-
// this.onAdded = new Phaser.Signal();
82
-
// this.onRemoved = new Phaser.Signal();
96
+
/**
97
+
* @property {array} _groupCallbacks - Array of Group callbacks.
98
+
* @private
99
+
*/
100
+
this._groupCallbacks=[];
101
+
102
+
/**
103
+
* @property {array} _bodyCallbackContext - Array of Grouo callback contexts.
0 commit comments