Files
001code-html--cocos/scratch-vm/test/snapshot/__snapshots__/warp-timer/tw-promise-loop-double-yield-kouzeru.sb3.tw-snapshot
刘宇飞 6e0a1fbcbb Initial commit of 001code-html Scratch frontend project.
Includes scratch-gui, scratch-vm, scratch-blocks, scratch-render, scratch-l10n, and deployment config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 15:37:45 +08:00

53 lines
1.8 KiB
Plaintext

// TW Snapshot
// Input SHA-256: f8c5c7c3ba1afbd140646e67d9987964cdcdf0cb30b53a0f6276b11f460e7d25
// Sprite1 script
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
const b0 = stage.variables["JbF5exWEi*m?-UEmkASS"];
const b1 = stage.variables["[G/@.KGc-4y[(GZ(bt7o"];
const b2 = runtime.getOpcodeFunction("looks_say");
const b3 = runtime.getOpcodeFunction("sound_seteffectto");
return function* genXYZ () {
while (true) {
if (compareEqual(b0.value, b1.value)) {
} else {
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b2, false, false, "89/dl$1dp$~nj81:jj@H", null);
b1.value = b0.value;
yield* executeInCompatibilityLayer({"VALUE":b0.value,"EFFECT":"pitch",}, b3, false, true, "*=8r,g4Pzvxo?aSMcpfX", null);
if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}
}
yield;
}
retire(); return;
}; })
// Sprite1 script
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
const b0 = stage.variables["[G/@.KGc-4y[(GZ(bt7o"];
const b1 = runtime.getOpcodeFunction("looks_say");
const b2 = stage.variables["JbF5exWEi*m?-UEmkASS"];
return function* genXYZ () {
b0.value = 0;
yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b1, false, false, "0/2-)Gp^^=haQ1OMD.xb", null);
for (var a0 = 15; a0 >= 0.5; a0--) {
if (((+b2.value || 0) === 200)) {
b2.value = 50;
} else {
b2.value = 200;
}
thread.timer = timer();
var a1 = Math.max(0, 1000 * 0);
runtime.requestRedraw();
yield;
while (thread.timer.timeElapsed() < a1) {
yield;
}
thread.timer = null;
yield;
}
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "--nBRXyJfqS0MM9`#S3}", null);
runtime.stopAll();
retire(); return;
retire(); return;
}; })