Skip to content

Commit 0dccc3a

Browse files
committed
Updated jsdocs. Fix phaserjs#3849
1 parent 2dfe321 commit 0dccc3a

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Setting the `resolution` property in the Game Config to a value other than 1 wou
216216

217217
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
218218

219-
@SBCGames @rgk @rook2pawn @robbintt @bguyl @halilcakarr @PhaserEditor2D @Edwin222 @tfelix @Yudikubota @hexus @guzmonne @ampled @thanh-taro @dcbriccetti @Dreaded-Gnu @padme-amidala @rootasjey @ampled @thejonanshow @polarstoat @jdjoshuadavison
219+
@SBCGames @rgk @rook2pawn @robbintt @bguyl @halilcakarr @PhaserEditor2D @Edwin222 @tfelix @Yudikubota @hexus @guzmonne @ampled @thanh-taro @dcbriccetti @Dreaded-Gnu @padme-amidala @rootasjey @ampled @thejonanshow @polarstoat @jdjoshuadavison @alexeymolchan
220220

221221
Thanks to @khaleb85 for fixing the super-annoying lag on the API Docs pages when it hung the browser while indexing the search field.
222222

src/gameobjects/GameObject.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ var GameObject = new Class({
385385
},
386386

387387
/**
388-
* If this Game Object has previously been enabled for input, this will remove it.
388+
* If this Game Object has previously been enabled for input, this will queue it
389+
* for removal, causing it to no longer be interactive. The removal happens on
390+
* the next game step, it is not immediate.
389391
*
390392
* The Interactive Object that was assigned to this Game Object will be destroyed,
391393
* removed from the Input Manager and cleared from this Game Object.
@@ -396,6 +398,11 @@ var GameObject = new Class({
396398
* If you wish to only temporarily stop an object from receiving input then use
397399
* `disableInteractive` instead, as that toggles the interactive state, where-as
398400
* this erases it completely.
401+
*
402+
* If you wish to resize a hit area, don't remove and then set it as being
403+
* interactive. Instead, access the hitarea object directly and resize the shape
404+
* being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the
405+
* shape is a Rectangle, which it is by default.)
399406
*
400407
* @method Phaser.GameObjects.GameObject#removeInteractive
401408
* @since 3.7.0

0 commit comments

Comments
 (0)