pxt-common-packages 10.3.10 → 10.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/built/common-sim.js +0 -2
  2. package/libs/azureiot/built/debug/binary.js +461 -461
  3. package/libs/color/built/debug/binary.js +8 -8
  4. package/libs/color-sensor/built/debug/binary.js +8 -8
  5. package/libs/controller/built/debug/binary.js +7019 -7019
  6. package/libs/controller---none/built/debug/binary.js +6999 -6999
  7. package/libs/datalogger/built/debug/binary.js +63 -63
  8. package/libs/edge-connector/built/debug/binary.js +8 -8
  9. package/libs/esp32/built/debug/binary.js +462 -462
  10. package/libs/game/built/debug/binary.js +6938 -6938
  11. package/libs/game/controller.ts +5 -0
  12. package/libs/game/sim/multiplayer.ts +0 -2
  13. package/libs/lcd/built/debug/binary.js +8 -8
  14. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  15. package/libs/lora/built/debug/binary.js +8 -8
  16. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  17. package/libs/mqtt/built/debug/binary.js +176 -176
  18. package/libs/multiplayer/player.ts +15 -0
  19. package/libs/net/built/debug/binary.js +176 -176
  20. package/libs/net-game/built/debug/binary.js +8527 -8527
  21. package/libs/palette/built/debug/binary.js +6937 -6937
  22. package/libs/pixel/built/debug/binary.js +8 -8
  23. package/libs/power/built/debug/binary.js +8 -8
  24. package/libs/proximity/built/debug/binary.js +8 -8
  25. package/libs/radio/built/debug/binary.js +8 -8
  26. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  27. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  28. package/libs/screen/built/debug/binary.js +50 -50
  29. package/libs/servo/built/debug/binary.js +8 -8
  30. package/libs/sprite-scaling/built/debug/binary.js +6937 -6937
  31. package/libs/storyboard/built/debug/binary.js +6937 -6937
  32. package/package.json +1 -1
@@ -57,6 +57,9 @@ namespace mp {
57
57
  _state: number[];
58
58
  _index: number;
59
59
  _data: any;
60
+ _mwb: boolean;
61
+ _vx: number;
62
+ _vy: number;
60
63
 
61
64
  constructor(index: number) {
62
65
  this._index = index;
@@ -110,10 +113,22 @@ namespace mp {
110
113
  );
111
114
 
112
115
  }
116
+
117
+ if (this._sprite && this._mwb) {
118
+ this._getController().stopControllingSprite(this._sprite);
119
+ }
120
+
113
121
  this._sprite = sprite;
122
+
123
+ if (this._sprite && this._mwb) {
124
+ this._getController().moveSprite(this._sprite, this._vx, this._vy);
125
+ }
114
126
  }
115
127
 
116
128
  moveWithButtons(vx?: number, vy?: number) {
129
+ this._mwb = true;
130
+ this._vx = vx;
131
+ this._vy = vy;
117
132
  this._getController().moveSprite(this.getSprite(), vx, vy);
118
133
  }
119
134