mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Add clearing of values on disconnect.
This commit is contained in:
parent
93aecc88be
commit
e87dd01629
1 changed files with 9 additions and 0 deletions
|
@ -167,6 +167,15 @@ class GdxFor {
|
|||
* Disconnect from the GDX FOR.
|
||||
*/
|
||||
disconnect () {
|
||||
this._sensors = {
|
||||
force: 0,
|
||||
accelerationX: 0,
|
||||
accelerationY: 0,
|
||||
accelerationZ: 0,
|
||||
spinSpeedX: 0,
|
||||
spinSpeedY: 0,
|
||||
spinSpeedZ: 0
|
||||
};
|
||||
if (this._scratchLinkSocket) {
|
||||
this._scratchLinkSocket.disconnect();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue