Skip to content

Commit

Permalink
Updating Gopher and Free Throw Jr (#6283)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-lee authored Dec 15, 2023
1 parent 39e0d63 commit 05904e4
Show file tree
Hide file tree
Showing 8 changed files with 376 additions and 463 deletions.
Binary file modified docs/static/mcj/gopher/how1-1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/test/mcj/goal1/goal1-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@



![How to win](/static/mkj/goal/goal1-1.gif "Walk forward to get to the ball!")
![How to win](/static/mcj/goal/goal1-1.gif "Walk forward to get to the ball!")



## {One Step}

![How to build](/static/mkj/goal/how1-1.gif "Add three right arrows")
![How to build](/static/mcj/goal/how1-1.gif "Add three right arrows")


<!--
## {How to run}
![How to Check](/static/mkj/goal/check1-1.gif "Click the A button on the game window")
![How to Check](/static/mcj/goal/check1-1.gif "Click the A button on the game window")
-->

Expand All @@ -35,7 +35,7 @@
## Great Job! @showdialog


[![Level 2](/static/mkj/assets/next.png)](https://arcade.makecode.com/beta#recipe:/test/mkj/goal1/goal1-2)
[![Level 2](/static/mcj/assets/next.png)](https://arcade.makecode.com/beta#recipe:/test/mcj/goal1/goal1-2)



Expand Down
8 changes: 4 additions & 4 deletions docs/test/mcj/goal1/goal1-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@



![How to win](/static/mkj/goal/goal1-2.gif "Walk forward to get to the ball!")
![How to win](/static/mcj/goal/goal1-2.gif "Walk forward to get to the ball!")



## {One Step}

![How to build](/static/mkj/goal/how1-2.gif "Add three right arrows")
![How to build](/static/mcj/goal/how1-2.gif "Add three right arrows")

<!-->
# {How to Run}

![How to Check](/static/mkj/goal/check1-2.gif "Click the A button on the game window") -->
![How to Check](/static/mcj/goal/check1-2.gif "Click the A button on the game window") -->


```blocks
Expand All @@ -31,7 +31,7 @@
## Great Job! @showdialog


<!-- [![Level 2](/static/mkj/assets/next.png)](beta#recipe:/mkj/goal/goal1-2) -->
<!-- [![Level 2](/static/mcj/assets/next.png)](beta#recipe:/mcj/goal/goal1-2) -->



Expand Down
29 changes: 18 additions & 11 deletions docs/test/mcj/gopher/gopher1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### @explicitHints true
### @flyoutOnly true

## Let's Get Gopher Crazy! @showdialog
## Gopher it! @showdialog

Get the gopher to the acorn.

Expand All @@ -16,10 +16,7 @@ Get the gopher to the acorn.

Move down to get the acorn!

```block
sprites.step_down()
```

---

![How to build](/static/mcj/gopher/how1-1.gif "Dig down to get to the acorn.")

Expand All @@ -38,7 +35,7 @@ sprites.step_down()
#### ~ tutorialhint

```blocks
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
controller.onA(function () {
//@highlight
sprites.step_down()
})
Expand All @@ -57,10 +54,9 @@ arcade-block-icons=github:kiki-lee/arcade-block-icons
```

```template
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {})

```template
controller.onA( function () {})
```


Expand Down Expand Up @@ -192,11 +188,22 @@ namespace sprites {
pause(500)
}
}
namespace controller {
/**
* Register code run when a controller event occurs
* @param event
* @param handler
*/
//% weight=99 blockGap=8
//% blockId=ctrlonA block="on `ICON.a-button-white-invert`"
//% help=docs/on-a
export function onA(handler: () => void) {
controller.A.onEvent(ControllerButtonEvent.Pressed, handler)
}
}
```
Expand Down
29 changes: 18 additions & 11 deletions docs/test/mcj/gopher/gopher2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### @explicitHints true
### @flyoutOnly true

## Let's Get Gopher Crazy! @showdialog
## Gopher the goal! @showdialog

Get the gopher to the acorn.

Expand All @@ -16,10 +16,6 @@ Get the gopher to the acorn.

Move down to get the acorn!

```block
sprites.step_down()
```


---

Expand All @@ -35,7 +31,7 @@ sprites.step_down()
#### ~ tutorialhint

```blocks
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
controller.onA (function () {
//@highlight
sprites.step_down()
//@highlight
Expand All @@ -56,10 +52,9 @@ arcade-block-icons=github:kiki-lee/arcade-block-icons
```

```template
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {})

```template
controller.onA( function () {})
```


Expand Down Expand Up @@ -191,12 +186,24 @@ namespace sprites {
pause(500)
}
}
namespace controller {
/**
* Register code run when a controller event occurs
* @param event
* @param handler
*/
//% weight=99 blockGap=8
//% blockId=ctrlonA block="on `ICON.a-button-white-invert`"
//% help=docs/on-a
export function onA(handler: () => void) {
controller.A.onEvent(ControllerButtonEvent.Pressed, handler)
}
}
```

Expand Down
30 changes: 18 additions & 12 deletions docs/test/mcj/gopher/gopher3.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Gopher the Goal
# Gopher the Acorn
### @explicitHints true
### @flyoutOnly true

## Let's Get Gopher Crazy! @showdialog
## Gopher the acorn! @showdialog

Get the gopher to the acorn.

Expand All @@ -16,11 +16,6 @@ Get the gopher to the acorn.

Move down to get the acorn!

```block
sprites.step_down()
```


---


Expand All @@ -35,7 +30,7 @@ sprites.step_down()
#### ~ tutorialhint

```blocks
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
controller.onA(function () {
//@highlight
sprites.step_down()
//@highlight
Expand All @@ -58,10 +53,9 @@ arcade-block-icons=github:kiki-lee/arcade-block-icons
```

```template
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {})

```template
controller.onA( function () {})
```


Expand Down Expand Up @@ -193,13 +187,25 @@ namespace sprites {
pause(500)
}
}
namespace controller {
/**
* Register code run when a controller event occurs
* @param event
* @param handler
*/
//% weight=99 blockGap=8
//% blockId=ctrlonA block="on `ICON.a-button-white-invert`"
//% help=docs/on-a
export function onA(handler: () => void) {
controller.A.onEvent(ControllerButtonEvent.Pressed, handler)
}
}
```


Expand Down
15 changes: 7 additions & 8 deletions docs/test/mcj/gopher/gopher4.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ Get the gopher to the acorn.
## {Get to the Acorns}


Use loops to get the acorn!
Use a loop to get the acorn!

---

```block
loops.loopThis(4, function (){ })
```


---


Expand All @@ -30,7 +31,7 @@ loops.loopThis(4, function (){ })
#### ~ tutorialhint

```blocks
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
controller.onA( function () {
//@highlight
loops.loopThis(4, function () {
sprites.step_down()
Expand All @@ -49,14 +50,12 @@ loops.loopThis(4, function (){ })
pxt-tilemaps=github:microsoft/pxt-tilemaps
pxt-characterAnimations=github:microsoft/arcade-character-animations
makecodejr-assets=github:kiki-lee/makecodejr-assets
arcade-block-icons=github:kiki-lee/arcade-block-icons
arcade-block-icons=github:kiki-lee/arcade-block-icons#v0.0.13
```

```template
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {})
controller.onA( function () {})
```


Expand Down Expand Up @@ -215,7 +214,7 @@ namespace sprites {
//% blockId=ctrlonA block="on `ICON.a-button-white-invert`"
//% help=docs/on-a
export function onA(handler: () => void) {
controller.A.onEvent(ControllerButtonEvent.Pressed, handler)
controller.A.onEvent(ControllerButtonEvent.Pressed, handler)
}
}
Expand Down
Loading

0 comments on commit 05904e4

Please sign in to comment.