Skip to content

Commit

Permalink
toLeopard: add motion_ifonedgebounce
Browse files Browse the repository at this point in the history
  • Loading branch information
towerofnix committed Mar 4, 2024
1 parent 7d796f7 commit 1d7e183
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/__tests__/__snapshots__/compilesb3.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class Abby extends Sprite {
this.x = -36;
this.y += 10;
this.y = -23;
/* TODO: Implement motion_ifonedgebounce */ null;
this.ifOnEdgeBounce();
this.rotationStyle = Sprite.RotationStyle.LEFT_RIGHT;
this.createClone();
this.deleteThisClone();
Expand Down
9 changes: 9 additions & 0 deletions src/io/leopard/toLeopard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export default function toLeopard(
"glide",
"goto",
"move",
"ifOnEdgeBounce",
"rotationStyle",
"x",
"y",
Expand Down Expand Up @@ -791,6 +792,14 @@ export default function toLeopard(
break;
}

case OpCode.motion_ifonedgebounce: {
satisfiesInputShape = InputShape.Stack;

blockSource = `this.ifOnEdgeBounce()`;

break;
}

case OpCode.motion_setrotationstyle: {
satisfiesInputShape = InputShape.Stack;

Expand Down

0 comments on commit 1d7e183

Please sign in to comment.