Skip to content

Commit c6f4a6e

Browse files
committed
Arcade Physics Colliders have a name property and setName method.
1 parent d72c7d5 commit c6f4a6e

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/physics/arcade/Collider.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ var Collider = new Class({
3838
*/
3939
this.world = world;
4040

41+
/**
42+
* [description]
43+
*
44+
* @name Phaser.Physics.Arcade.Collider#name
45+
* @type {string}
46+
* @since 3.0.0
47+
*/
48+
this.name = '';
49+
4150
/**
4251
* [description]
4352
*
@@ -103,6 +112,23 @@ var Collider = new Class({
103112
this.callbackContext = callbackContext;
104113
},
105114

115+
/**
116+
* [description]
117+
*
118+
* @method Phaser.Physics.Arcade.Collider#setName
119+
* @since 3.0.0
120+
*
121+
* @param {string} name - [description]
122+
*
123+
* @return {Phaser.Physics.Arcade.Collider} [description]
124+
*/
125+
setName: function (name)
126+
{
127+
this.name = name;
128+
129+
return this;
130+
},
131+
106132
/**
107133
* [description]
108134
*

0 commit comments

Comments
 (0)