File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,6 +152,39 @@ Phaser.Component.Data.prototype = {
152152 }
153153 } ,
154154
155+ merge : function ( data )
156+ {
157+ // Merge data from another component into this one
158+ } ,
159+
160+ clone : function ( data )
161+ {
162+ // Export this Data component
163+ } ,
164+
165+ remove : function ( key )
166+ {
167+ if ( ! this . _frozen && this . list . hasOwnProperty ( key ) )
168+ {
169+ delete this . list [ key ] ;
170+
171+ this . removeListeners ( key ) ;
172+ }
173+ } ,
174+
175+ removeListeners : function ( key )
176+ {
177+ if ( this . _beforeCallbacks . hasOwnProperty ( key ) )
178+ {
179+ delete this . _beforeCallbacks [ key ] ;
180+ }
181+
182+ if ( this . _afterCallbacks . hasOwnProperty ( key ) )
183+ {
184+ delete this . _afterCallbacks [ key ] ;
185+ }
186+ } ,
187+
155188 // Gets the data associated with the given 'key', deletes it from this Data store, then returns it.
156189 pop : function ( key )
157190 {
@@ -162,6 +195,8 @@ Phaser.Component.Data.prototype = {
162195 data = this . list [ key ] ;
163196
164197 delete this . list [ key ] ;
198+
199+ this . removeListeners ( key ) ;
165200 }
166201
167202 return data ;
You can’t perform that action at this time.
0 commit comments