pxt-common-packages 10.3.9 → 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 (37) 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 +8126 -7957
  6. package/libs/controller---none/built/debug/binary.js +8105 -7936
  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/_locales/game-strings.json +1 -1
  11. package/libs/game/built/debug/binary.js +8018 -7849
  12. package/libs/game/controller.ts +5 -0
  13. package/libs/game/game.ts +35 -18
  14. package/libs/game/info.ts +2 -2
  15. package/libs/game/sim/multiplayer.ts +0 -2
  16. package/libs/lcd/built/debug/binary.js +8 -8
  17. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  18. package/libs/lora/built/debug/binary.js +8 -8
  19. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  20. package/libs/mixer/melody.ts +1 -1
  21. package/libs/mixer/soundEffect.ts +1 -0
  22. package/libs/mqtt/built/debug/binary.js +176 -176
  23. package/libs/multiplayer/player.ts +15 -0
  24. package/libs/net/built/debug/binary.js +176 -176
  25. package/libs/net-game/built/debug/binary.js +9825 -9656
  26. package/libs/palette/built/debug/binary.js +8017 -7848
  27. package/libs/pixel/built/debug/binary.js +8 -8
  28. package/libs/power/built/debug/binary.js +8 -8
  29. package/libs/proximity/built/debug/binary.js +8 -8
  30. package/libs/radio/built/debug/binary.js +8 -8
  31. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  32. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  33. package/libs/screen/built/debug/binary.js +50 -50
  34. package/libs/servo/built/debug/binary.js +8 -8
  35. package/libs/sprite-scaling/built/debug/binary.js +8017 -7848
  36. package/libs/storyboard/built/debug/binary.js +8017 -7848
  37. 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