File tree Expand file tree Collapse file tree
v3/src/physics/arcade/events Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ var Class = require ( '../../../utils/Class' ) ;
2+ var Event = require ( '../../../events/Event' ) ;
3+
4+ var ArcadePhysicsCollideEvent = new Class ( {
5+
6+ Extends : Event ,
7+
8+ initialize :
9+
10+ function ArcadePhysicsCollideEvent ( gameObjectA , gameObjectB )
11+ {
12+ Event . call ( this , 'ARCADE_COLLIDE_EVENT' ) ;
13+
14+ this . gameObjectA = gameObjectA ;
15+
16+ this . gameObjectB = gameObjectB ;
17+
18+ this . bodyA = gameObjectA . body ;
19+
20+ this . bodyB = gameObjectB . body ;
21+ }
22+
23+ } ) ;
24+
25+ module . exports = ArcadePhysicsCollideEvent ;
Original file line number Diff line number Diff line change 1+ var Class = require ( '../../../utils/Class' ) ;
2+ var Event = require ( '../../../events/Event' ) ;
3+
4+ var ArcadePhysicsOverlapEvent = new Class ( {
5+
6+ Extends : Event ,
7+
8+ initialize :
9+
10+ function ArcadePhysicsOverlapEvent ( gameObjectA , gameObjectB )
11+ {
12+ Event . call ( this , 'ARCADE_OVERLAP_EVENT' ) ;
13+
14+ this . gameObjectA = gameObjectA ;
15+
16+ this . gameObjectB = gameObjectB ;
17+
18+ this . bodyA = gameObjectA . body ;
19+
20+ this . bodyB = gameObjectB . body ;
21+ }
22+
23+ } ) ;
24+
25+ module . exports = ArcadePhysicsOverlapEvent ;
Original file line number Diff line number Diff line change 1+ var Class = require ( '../../../utils/Class' ) ;
2+ var Event = require ( '../../../events/Event' ) ;
3+
4+ var ArcadePhysicsWorldBoundsEvent = new Class ( {
5+
6+ Extends : Event ,
7+
8+ initialize :
9+
10+ function ArcadePhysicsWorldBoundsEvent ( body )
11+ {
12+ Event . call ( this , 'ARCADE_WORLD_BOUNDS_EVENT' ) ;
13+
14+ this . gameObject = body . gameObject ;
15+
16+ this . body = body ;
17+
18+ this . blockedUp = body . blocked . up ;
19+ this . blockedDown = body . blocked . down ;
20+ this . blockedLeft = body . blocked . left ;
21+ this . blockedRight = body . blocked . right ;
22+ }
23+
24+ } ) ;
25+
26+ module . exports = ArcadePhysicsWorldBoundsEvent ;
Original file line number Diff line number Diff line change 1+ // Phaser.Physics.ArcadePhysics.Events
2+
3+ module . exports = {
4+
5+ OVERLAP : require ( './ArcadePhysicsOverlapEvent' ) ,
6+ COLLIDE : require ( './ArcadePhysicsCollideEvent' ) ,
7+ WORLD_BOUNDS : require ( './ArcadePhysicsWorldBoundsEvent' )
8+
9+ } ;
You can’t perform that action at this time.
0 commit comments