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.
- package/built/common-sim.js +0 -2
- package/libs/azureiot/built/debug/binary.js +461 -461
- package/libs/color/built/debug/binary.js +8 -8
- package/libs/color-sensor/built/debug/binary.js +8 -8
- package/libs/controller/built/debug/binary.js +8126 -7957
- package/libs/controller---none/built/debug/binary.js +8105 -7936
- package/libs/datalogger/built/debug/binary.js +63 -63
- package/libs/edge-connector/built/debug/binary.js +8 -8
- package/libs/esp32/built/debug/binary.js +462 -462
- package/libs/game/_locales/game-strings.json +1 -1
- package/libs/game/built/debug/binary.js +8018 -7849
- package/libs/game/controller.ts +5 -0
- package/libs/game/game.ts +35 -18
- package/libs/game/info.ts +2 -2
- package/libs/game/sim/multiplayer.ts +0 -2
- package/libs/lcd/built/debug/binary.js +8 -8
- package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
- package/libs/lora/built/debug/binary.js +8 -8
- package/libs/matrix-keypad/built/debug/binary.js +8 -8
- package/libs/mixer/melody.ts +1 -1
- package/libs/mixer/soundEffect.ts +1 -0
- package/libs/mqtt/built/debug/binary.js +176 -176
- package/libs/multiplayer/player.ts +15 -0
- package/libs/net/built/debug/binary.js +176 -176
- package/libs/net-game/built/debug/binary.js +9825 -9656
- package/libs/palette/built/debug/binary.js +8017 -7848
- package/libs/pixel/built/debug/binary.js +8 -8
- package/libs/power/built/debug/binary.js +8 -8
- package/libs/proximity/built/debug/binary.js +8 -8
- package/libs/radio/built/debug/binary.js +8 -8
- package/libs/radio-broadcast/built/debug/binary.js +8 -8
- package/libs/rotary-encoder/built/debug/binary.js +8 -8
- package/libs/screen/built/debug/binary.js +50 -50
- package/libs/servo/built/debug/binary.js +8 -8
- package/libs/sprite-scaling/built/debug/binary.js +8017 -7848
- package/libs/storyboard/built/debug/binary.js +8017 -7848
- 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
|
|