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/core/Signal.js
+69-18Lines changed: 69 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Phaser.Signal.prototype = {
54
54
55
55
/**
56
56
* If Signal is active and should broadcast events.
57
-
* <p><strong>IMPORTANT:</strong> Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.</p>
57
+
* IMPORTANT: Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.
58
58
* @property {boolean} active
59
59
* @default
60
60
*/
@@ -67,9 +67,12 @@ Phaser.Signal.prototype = {
67
67
* @private
68
68
*/
69
69
validateListener: function(listener,fnName){
70
-
if(typeoflistener!=='function'){
71
-
thrownewError('listener is a required param of {fn}() and should be a Function.'.replace('{fn}',fnName));
70
+
71
+
if(typeoflistener!=='function')
72
+
{
73
+
thrownewError('Phaser.Signal: listener is a required param of {fn}() and should be a Function.'.replace('{fn}',fnName));
thrownewError('You cannot add'+(isOnce ? '' : 'Once')+'() then add'+(!isOnce ? '' : 'Once')+'() the same listener without removing the relationship first.');
0 commit comments