kopia lustrzana https://github.com/backface/turtlestitch
let “switch to costume” block accept actual costume objects (in addition to names and numbers)
rodzic
6fd93533ec
commit
ce3340e623
|
@ -2108,3 +2108,4 @@ ______
|
||||||
------
|
------
|
||||||
* Objects: experimental “wardrobe” and “jukebox” reporters in dev mode
|
* Objects: experimental “wardrobe” and “jukebox” reporters in dev mode
|
||||||
* Blocks, Objects: display costume thumbnails in speech/thought/value bubbles and watcher cells
|
* Blocks, Objects: display costume thumbnails in speech/thought/value bubbles and watcher cells
|
||||||
|
* Objects: let “switch to costume” block accept actual costume objects (in addition to names and numbers)
|
||||||
|
|
|
@ -2291,6 +2291,11 @@ SpriteMorph.prototype.doWearPreviousCostume = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
SpriteMorph.prototype.doSwitchToCostume = function (id) {
|
SpriteMorph.prototype.doSwitchToCostume = function (id) {
|
||||||
|
if (id instanceof Costume) { // allow first-class costumes
|
||||||
|
this.wearCostume(id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var num,
|
var num,
|
||||||
arr = this.costumes.asArray(),
|
arr = this.costumes.asArray(),
|
||||||
costume;
|
costume;
|
||||||
|
|
Ładowanie…
Reference in New Issue