pxt-arcade 1.13.11 → 1.13.12
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.d.ts +4 -0
- package/built/common-sim.js +187 -0
- package/built/sim.js +187 -0
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.json +1 -1
- package/built/theme.json +1 -1
- package/docs/concepts/bouncing-burger.md +5 -5
- package/docs/concepts/breadcrumb-trail.md +4 -4
- package/docs/concepts/picnic-food.md +6 -6
- package/docs/concepts/princess-pizza.md +4 -4
- package/docs/concepts/setting-the-scene.md +2 -2
- package/docs/concepts/throw-a-bone.md +5 -5
- package/docs/concepts/walking-hero.md +3 -3
- package/docs/lessons/barrel-dodger.md +3 -3
- package/docs/multiplayer-games.md +12 -12
- package/docs/projects/SUMMARY.md +6 -6
- package/docs/recipes/shark-splash/01-character.md +3 -3
- package/docs/recipes/shark-splash/02-A-enemies.md +2 -2
- package/docs/recipes/shark-splash/02-enemies.md +5 -5
- package/docs/recipes/shark-splash/04-background.md +3 -3
- package/docs/recipes/side-scroller/02-create-car.md +2 -2
- package/docs/skillmaps.md +2 -0
- package/docs/static/badges/badge-adventure-locked.png +0 -0
- package/docs/static/badges/badge-adventure.png +0 -0
- package/docs/test/skillmap/dino/dino3.md +1 -0
- package/docs/test/skillmap/star/star1.md +7 -31
- package/docs/test/skillmap/star/star2.md +4 -1
- package/docs/test/skillmap/star/star4.md +54 -3
- package/docs/tutorials/catch-the-football.md +8 -8
- package/docs/tutorials/chase-the-basketball.md +5 -5
- package/docs/tutorials/free-throw.md +4 -4
- package/package.json +2 -2
- package/pxtarget.json +1 -1
- package/targetconfig.json +1 -1
package/built/targetlight.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"arcade","name":"arcade","nickname":"arcade","thumbnailName":"MakeCode Arcade","title":"Microsoft MakeCode Arcade","description":"Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor","corepkg":"device","cloud":{"workspace":false,"sharing":true,"thumbnails":true,"importing":true,"packages":true,"publishing":true,"githubPackages":true,"showBadges":true,"cloudProviders":{"github":{"id":"github","name":"GitHub","icon":"/static/providers/github-mark.png","identity":false,"order":3},"microsoft":{"id":"microsoft","name":"Microsoft","icon":"/static/providers/microsoft-logo.svg","identity":true,"redirect":true,"order":1},"google":{"id":"google","name":"Google","icon":"/static/providers/google-logo.svg","identity":true,"redirect":true,"order":2}}},"staticpkgdirs":{"base":["libs/hw","libs/hw---n3","libs/hw---samd51","libs/hw---stm32f401"],"extensions":["libs/accelerometer","libs/color","libs/edge-connector","libs/esp32","libs/feather","libs/light","libs/lightsensor","libs/mqtt","libs/net","libs/net-game","libs/palette","libs/radio","libs/radio-broadcast","libs/serial","libs/servo","libs/settings","libs/sevenseg","libs/thermometer"]},"cacheusedblocksdirs":["skillmap/space","skillmap/platformer"],"compile":{"useUF2":true,"deployDrives":"(ARCADE|PY|FTHR840BOOT|ARCD|RPI-RP2)","deployFileMarker":"INFO_UF2.TXT","driveName":"ARCADE","floatingPoint":true,"taggedInts":true,"nativeType":"thumb","gc":true,"upgrades":[],"webUSB":true,"saveAsPNG":true,"patches":{"0.0.0 - *":[{"type":"missingPackage","map":{"(DigitalPin|AnalogPin|pins)\\.P\\d\\d?":"edge-connector","serial\\.":"serial"}}],"0.0.0 - 0.1.1":[{"type":"api","map":{"controller\\.controlSprite":"controller.moveSprite","controller\\.controlPlayer":"controller.movePlayer"}}],"0.0.0 - 0.3.23":[{"type":"package","map":{"local-multiplayer":""}}],"0.0.0 - 0.3.24":[{"type":"api","map":{"sprites\\.createEmptySprite\\(([^)]+)\\)":"sprites.create(img`.`, $1)"}},{"type":"blockId","map":{"keysdx":"keydx","keysdy":"keydy"}}],"0.0.0 - 0.11.20":[{"type":"api","map":{"SpriteKind":"SpriteKindLegacy"}}],"0.0.0 - 0.14.57":[{"type":"missingPackage","map":{"scene\\.setTileMap":"color-coded-tilemap","scene\\.setTile":"color-coded-tilemap","scene\\.getTile":"color-coded-tilemap","scene\\.getTilesByType":"color-coded-tilemap","scene\\.placeOnRandomTile":"color-coded-tilemap","scene\\.setTileAt":"color-coded-tilemap","scene\\.onHitTile":"color-coded-tilemap","\\.tileHitFrom":"color-coded-tilemap"}}],"0.0.0 - 0.18.9":[{"type":"api","map":{"tilemap\\s*\\.\\s*createTileSprite":"tiles.createTileSprite","tilemap\\s*\\.\\s*coverAllTiles":"tiles.coverAllTiles","tilemap\\s*\\.\\s*createSpritesOnTiles":"tiles.createSpritesOnTiles","tilemap\\s*\\.\\s*destorySpritesOfKind":"tiles.destroySpritesOfKind","tilemap\\s*\\.\\s*tileIs":"tiles.tileIs","tilemap\\s*\\.\\s*tileIsWall":"tiles.tileIsWall","tilemap\\s*\\.\\s*forEachTileOfKind":"tiles.forEachTileOfKind","tilemap\\s*\\.\\s*forEachTileOfMap":"tiles.forEachTileOfMap","tilemap\\s*\\.\\s*replaceAllTiles":"tiles.replaceAllTiles","tilemap\\s*\\.\\s*columnInDirection":"tiles.columnInDirection","tilemap\\s*\\.\\s*rowInDirection":"tiles.rowInDirection","tilemap\\s*\\.\\s*forEachDirection":"tiles.forEachDirection","tilemap\\s*\\.\\s*centerCameraOnTile":"tiles.centerCameraOnTile","tilemap\\s*\\.\\s*locationOfSprite":"tiles.locationOfSprite","tilemap\\s*\\.\\s*RowCol":"tiles.RowCol","tilemap\\s*\\.\\s*spriteRowCol":"tiles.spriteRowCol","tilemap\\s*\\.\\s*locationColumn":"tiles.locationColumn","tilemap\\s*\\.\\s*locationRow":"tiles.locationRow","tilemap\\s*\\.\\s*XY":"tiles.XY","tilemap\\s*\\.\\s*locationXY":"tiles.locationXY","tilemap\\s*\\.\\s*locationInDirection":"tiles.locationInDirection","tilemap\\s*\\.\\s*_directionEditor":"tiles._directionEditor","tilemap\\s*\\.\\s*tileWidth":"tiles.tileWidth","tilemap\\s*\\.\\s*tilemapColumns":"tiles.tilemapColumns","tilemap\\s*\\.\\s*tilemapRows":"tiles.tilemapRows","tilemap\\s*\\.\\s*screenCoordinateToTile":"tiles.screenCoordinateToTile","tilemap\\s*\\.\\s*tileCoordinateToScreen":"tiles.tileCoordinateToScreen","tilemap\\s*\\.\\s*centeredTileCoordinateToScreen":"tiles.centeredTileCoordinateToScreen","tilemap\\s*\\.\\s*OVERWORLD_MAP_ID":"tiles.OVERWORLD_MAP_ID","tilemap\\s*\\.\\s*MAP_LOADED_EVENT":"tiles.MAP_LOADED_EVENT","tilemap\\s*\\.\\s*WorldMap":"tiles.WorldMap","tilemap\\s*\\.\\s*WorldMapConnection":"tiles.WorldMapConnection","tilemap\\s*\\.\\s*createMap":"tiles.createMap","tilemap\\s*\\.\\s*copyMap":"tiles.copyMap","tilemap\\s*\\.\\s*loadMap":"tiles.loadMap","tilemap\\s*\\.\\s*getLoadedMap":"tiles.getLoadedMap","tilemap\\s*\\.\\s*onMapLoaded":"tiles.onMapLoaded","tilemap\\s*\\.\\s*onMapUnloaded":"tiles.onMapUnloaded","tilemap\\s*\\.\\s*connectMapById":"tiles.connectMapById","tilemap\\s*\\.\\s*loadConnectedMap":"tiles.loadConnectedMap","tilemap\\s*\\.\\s*getConnectedMap":"tiles.getConnectedMap","tilemap\\s*\\.\\s*setWorldLocationToMap":"tiles.setWorldLocationToMap","tilemap\\s*\\.\\s*loadMapAt":"tiles.loadMapAt","tilemap\\s*\\.\\s*getMapAtWorldLocation":"tiles.getMapAtWorldLocation","tilemap\\s*\\.\\s*loadMapInDirection":"tiles.loadMapInDirection","tilemap\\s*\\.\\s*loadedWorldColumn":"tiles.loadedWorldColumn","tilemap\\s*\\.\\s*loadedWorldRow":"tiles.loadedWorldRow"}}],"0.0.0 - 1.9.0":[{"type":"api","map":{"myCorg\\s*\\.\\s*follow":"myCorg.cameraFollow"}}]},"switches":{},"jsRefCounting":false,"utf8":true},"compileService":{"buildEngine":"codal","githubCorePackage":"lancaster-university/codal","gittag":"v0.8.0","dockerImage":"pext/yotta:latest","codalTarget":{"branches":{}}},"variants":{"stm32f401":{"compile":{"hasHex":true,"openocdScript":"source [find interface/stlink-v2.cfg]; source [find target/stm32f4x.cfg]","flashEnd":524288,"uf2Family":"0x57755a57"},"compileService":{"codalTarget":{"name":"codal-big-brainpad","url":"https://github.com/lancaster-university/codal-big-brainpad","branch":"v1.3.1","type":"git"},"codalBinary":"STM32","serviceId":"codal2stm32","dockerImage":"pext/yotta:latest"}},"samd51":{"compile":{"hasHex":true,"openocdScript":"source [find interface/cmsis-dap.cfg]; set CHIPNAME at91samd51g19; source [find target/atsame5x.cfg]","openocdScriptAlt":"source [find interface/stlink-v2.cfg]; set CPUTAPID 0x2ba01477; set CHIPNAME at91samd51g19; source [find target/at91samdXX.cfg]","ramSize":196608,"flashEnd":524288,"uf2Family":"0x55114460"},"compileService":{"codalTarget":{"name":"codal-itsybitsy-m4","url":"https://github.com/lancaster-university/codal-itsybitsy-m4","branch":"v0.2.7","type":"git"},"codalBinary":"ITSYBITSY_M4","serviceId":"codal2samd51","dockerImage":"pext/yotta:latest"}},"nrf52840":{"compile":{"hasHex":true,"openocdScript":"source [find interface/cmsis-dap.cfg]; source [find target/nrf52.cfg]","webUSB":false,"flashEnd":1007616,"uf2Family":"0xada52840"},"compileService":{"codalTarget":{"name":"codal-nrf52840-dk","url":"https://github.com/mmoskal/codal-nrf52840-dk","branch":"v1.1.7","type":"git"},"codalBinary":"NRF52840_DK","serviceId":"codal2nrf52840","dockerImage":"pext/yotta:latest","yottaConfig":{"pxt":{"board":{"id":"BOARD_ID_NRF52840"}}}}},"nrf52833":{"compile":{"hasHex":true,"openocdScript":"source [find interface/cmsis-dap.cfg]; source [find target/nrf52.cfg]","webUSB":false,"useUF2":false,"flashEnd":524288,"deployDrives":".*","deployFileMarker":"DETAILS.TXT"},"compileService":{"codalTarget":{"name":"codal-nrf52833-dk","url":"https://github.com/mmoskal/codal-nrf52833-dk","branch":"v2.0.2","type":"git"},"codalBinary":"NRF52840_DK","serviceId":"codal2nrf52840","dockerImage":"pext/yotta:latest","yottaConfig":{"pxt":{"board":{"id":"BOARD_ID_NRF52833"}}}}},"rp2040":{"compile":{"hasHex":true,"openocdScript":"???","flashChecksumAddr":0,"flashEnd":2097152,"uf2Family":"0xe48bff56"},"compileService":{"codalTarget":{"name":"codal-pi-pico","url":"https://github.com/lancaster-university/codal-pi-pico","branch":"v0.0.13","type":"git"},"gittag":"v0.9.0","codalBinary":"PI-PICO","serviceId":"codal2pico","dockerImage":"pext/arm:gcc9"}},"rpi":{"compile":{"hasHex":true,"useELF":true,"runtimeIsARM":true,"flashCodeAlign":256,"webUSB":false,"stackAlign":2},"compileService":{"buildEngine":"dockermake","dockerImage":"pext/rpi:alsa","serviceId":"rpi"}},"vm":{"compile":{"hasHex":true,"useELF":true,"flashCodeAlign":256,"webUSB":false,"nativeType":"vm","stackAlign":2},"compileService":{"buildEngine":"dockercross","dockerImage":"pext/crossbuild","serviceId":"crossbuild","skipCloudBuild":true}}},"serial":{"useEditor":true,"log":true,"editorTheme":{"graphBackground":"#d9d9d9","lineColors":["#009DDC","#FB48C7","#40bf4a","#8073E5","#d25b33"]}},"runtime":{"mathBlocks":true,"loopsBlocks":true,"logicBlocks":true,"variablesBlocks":true,"textBlocks":true,"functionBlocks":true,"breakBlock":true,"continueBlock":true,"pauseUntilBlock":{"category":"loops"},"functionsOptions":{"useNewFunctions":true,"extraFunctionEditorTypes":[{"typeName":"Sprite","icon":"send","defaultName":"mySprite"},{"typeName":"Image","icon":"image outline","defaultName":"myImage"}]},"listsBlocks":true,"tilesetFieldEditorIdentity":"images._tile","bannedCategories":["pins","control","input","serial","power"]},"simulator":{"autoRun":true,"autoRunLight":false,"emptyRunCode":"pxsim.pxtcore.updateScreen(new pxsim.RefImage(160, 120, 4))","aspectRatio":0.85,"dynamicBoardDefinition":true,"keymap":true,"messageSimulators":{"jacdac":{"url":"https://microsoft.github.io/jacdac-docs/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","localHostUrl":"http://localhost:8000/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","aspectRatio":"0.89","permanent":true}}},"queryVariants":{"skillsMap=1":{"appTheme":{"embeddedTutorial":true,"allowParentController":true,"shareFinishedTutorials":false}}},"unsupportedBrowsers":[{"id":"ie"}],"uploadDocs":true,"defaultBadges":[{"id":"skillmap-completion-save the forest","type":"skillmap-completion","image":"/static/badges/badge-forest.png","lockedImage":"/static/badges/badge-forest-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/forest","title":"Save the Forest"},{"id":"skillmap-completion-zookeeper","type":"skillmap-completion","image":"/static/badges/badge-zoo.png","lockedImage":"/static/badges/badge-zoo-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/zoo","title":"Zookeeper"},{"id":"skillmap-completion-rockstar","image":"/static/badges/badge-rockstar.png","lockedImage":"/static/badges/badge-rockstar-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/rockstar","type":"skillmap-completion","title":"80's Rockstar"},{"id":"skillmap-completion-build a platformer game!","image":"/static/badges/badge-jungle.png","lockedImage":"/static/badges/badge-jungle-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/jungle","type":"skillmap-completion","title":"Jungle Monkey"},{"id":"skillmap-completion-space","image":"/static/badges/badge-space.png","lockedImage":"/static/badges/badge-space-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/space","type":"skillmap-completion","title":"Space Explorer"},{"id":"skillmap-completion-shark","image":"/static/badges/badge-shark.png","lockedImage":"/static/badges/badge-shark-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/shark","type":"skillmap-completion","title":"Shark Splash"}],"versions":{"branch":"v1.13.11","tag":"v1.13.11","commits":"https://github.com/microsoft/pxt-arcade/commits/efd713b33c3b5219db15a35048fac629ea4d621b","target":"1.13.11","pxt":"8.6.14"},"blocksprj":{"id":"blocksprj","config":{"name":"{0}","dependencies":{"device":"*"},"description":"","files":["main.blocks","main.ts","README.md","assets.json"],"additionalFilePaths":[]},"files":{"README.md":" ","assets.json":"","main.blocks":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables></variables>\n <block type=\"pxt-on-start\" x=\"0\" y=\"0\"></block>\n</xml>","main.ts":" "}},"tsprj":{"id":"tsprj","config":{"name":"{0}","dependencies":{"device":"*"},"description":"","files":["main.ts","README.md","assets.json"],"additionalFilePaths":[]},"files":{"README.md":" ","assets.json":"","main.ts":" "}}}
|
|
1
|
+
{"id":"arcade","name":"arcade","nickname":"arcade","thumbnailName":"MakeCode Arcade","title":"Microsoft MakeCode Arcade","description":"Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor","corepkg":"device","cloud":{"workspace":false,"sharing":true,"thumbnails":true,"importing":true,"packages":true,"publishing":true,"githubPackages":true,"showBadges":true,"cloudProviders":{"github":{"id":"github","name":"GitHub","icon":"/static/providers/github-mark.png","identity":false,"order":3},"microsoft":{"id":"microsoft","name":"Microsoft","icon":"/static/providers/microsoft-logo.svg","identity":true,"redirect":true,"order":1},"google":{"id":"google","name":"Google","icon":"/static/providers/google-logo.svg","identity":true,"redirect":true,"order":2}}},"staticpkgdirs":{"base":["libs/hw","libs/hw---n3","libs/hw---samd51","libs/hw---stm32f401"],"extensions":["libs/accelerometer","libs/color","libs/edge-connector","libs/esp32","libs/feather","libs/light","libs/lightsensor","libs/mqtt","libs/net","libs/net-game","libs/palette","libs/radio","libs/radio-broadcast","libs/serial","libs/servo","libs/settings","libs/sevenseg","libs/thermometer"]},"cacheusedblocksdirs":["skillmap/space","skillmap/platformer"],"compile":{"useUF2":true,"deployDrives":"(ARCADE|PY|FTHR840BOOT|ARCD|RPI-RP2)","deployFileMarker":"INFO_UF2.TXT","driveName":"ARCADE","floatingPoint":true,"taggedInts":true,"nativeType":"thumb","gc":true,"upgrades":[],"webUSB":true,"saveAsPNG":true,"patches":{"0.0.0 - *":[{"type":"missingPackage","map":{"(DigitalPin|AnalogPin|pins)\\.P\\d\\d?":"edge-connector","serial\\.":"serial"}}],"0.0.0 - 0.1.1":[{"type":"api","map":{"controller\\.controlSprite":"controller.moveSprite","controller\\.controlPlayer":"controller.movePlayer"}}],"0.0.0 - 0.3.23":[{"type":"package","map":{"local-multiplayer":""}}],"0.0.0 - 0.3.24":[{"type":"api","map":{"sprites\\.createEmptySprite\\(([^)]+)\\)":"sprites.create(img`.`, $1)"}},{"type":"blockId","map":{"keysdx":"keydx","keysdy":"keydy"}}],"0.0.0 - 0.11.20":[{"type":"api","map":{"SpriteKind":"SpriteKindLegacy"}}],"0.0.0 - 0.14.57":[{"type":"missingPackage","map":{"scene\\.setTileMap":"color-coded-tilemap","scene\\.setTile":"color-coded-tilemap","scene\\.getTile":"color-coded-tilemap","scene\\.getTilesByType":"color-coded-tilemap","scene\\.placeOnRandomTile":"color-coded-tilemap","scene\\.setTileAt":"color-coded-tilemap","scene\\.onHitTile":"color-coded-tilemap","\\.tileHitFrom":"color-coded-tilemap"}}],"0.0.0 - 0.18.9":[{"type":"api","map":{"tilemap\\s*\\.\\s*createTileSprite":"tiles.createTileSprite","tilemap\\s*\\.\\s*coverAllTiles":"tiles.coverAllTiles","tilemap\\s*\\.\\s*createSpritesOnTiles":"tiles.createSpritesOnTiles","tilemap\\s*\\.\\s*destorySpritesOfKind":"tiles.destroySpritesOfKind","tilemap\\s*\\.\\s*tileIs":"tiles.tileIs","tilemap\\s*\\.\\s*tileIsWall":"tiles.tileIsWall","tilemap\\s*\\.\\s*forEachTileOfKind":"tiles.forEachTileOfKind","tilemap\\s*\\.\\s*forEachTileOfMap":"tiles.forEachTileOfMap","tilemap\\s*\\.\\s*replaceAllTiles":"tiles.replaceAllTiles","tilemap\\s*\\.\\s*columnInDirection":"tiles.columnInDirection","tilemap\\s*\\.\\s*rowInDirection":"tiles.rowInDirection","tilemap\\s*\\.\\s*forEachDirection":"tiles.forEachDirection","tilemap\\s*\\.\\s*centerCameraOnTile":"tiles.centerCameraOnTile","tilemap\\s*\\.\\s*locationOfSprite":"tiles.locationOfSprite","tilemap\\s*\\.\\s*RowCol":"tiles.RowCol","tilemap\\s*\\.\\s*spriteRowCol":"tiles.spriteRowCol","tilemap\\s*\\.\\s*locationColumn":"tiles.locationColumn","tilemap\\s*\\.\\s*locationRow":"tiles.locationRow","tilemap\\s*\\.\\s*XY":"tiles.XY","tilemap\\s*\\.\\s*locationXY":"tiles.locationXY","tilemap\\s*\\.\\s*locationInDirection":"tiles.locationInDirection","tilemap\\s*\\.\\s*_directionEditor":"tiles._directionEditor","tilemap\\s*\\.\\s*tileWidth":"tiles.tileWidth","tilemap\\s*\\.\\s*tilemapColumns":"tiles.tilemapColumns","tilemap\\s*\\.\\s*tilemapRows":"tiles.tilemapRows","tilemap\\s*\\.\\s*screenCoordinateToTile":"tiles.screenCoordinateToTile","tilemap\\s*\\.\\s*tileCoordinateToScreen":"tiles.tileCoordinateToScreen","tilemap\\s*\\.\\s*centeredTileCoordinateToScreen":"tiles.centeredTileCoordinateToScreen","tilemap\\s*\\.\\s*OVERWORLD_MAP_ID":"tiles.OVERWORLD_MAP_ID","tilemap\\s*\\.\\s*MAP_LOADED_EVENT":"tiles.MAP_LOADED_EVENT","tilemap\\s*\\.\\s*WorldMap":"tiles.WorldMap","tilemap\\s*\\.\\s*WorldMapConnection":"tiles.WorldMapConnection","tilemap\\s*\\.\\s*createMap":"tiles.createMap","tilemap\\s*\\.\\s*copyMap":"tiles.copyMap","tilemap\\s*\\.\\s*loadMap":"tiles.loadMap","tilemap\\s*\\.\\s*getLoadedMap":"tiles.getLoadedMap","tilemap\\s*\\.\\s*onMapLoaded":"tiles.onMapLoaded","tilemap\\s*\\.\\s*onMapUnloaded":"tiles.onMapUnloaded","tilemap\\s*\\.\\s*connectMapById":"tiles.connectMapById","tilemap\\s*\\.\\s*loadConnectedMap":"tiles.loadConnectedMap","tilemap\\s*\\.\\s*getConnectedMap":"tiles.getConnectedMap","tilemap\\s*\\.\\s*setWorldLocationToMap":"tiles.setWorldLocationToMap","tilemap\\s*\\.\\s*loadMapAt":"tiles.loadMapAt","tilemap\\s*\\.\\s*getMapAtWorldLocation":"tiles.getMapAtWorldLocation","tilemap\\s*\\.\\s*loadMapInDirection":"tiles.loadMapInDirection","tilemap\\s*\\.\\s*loadedWorldColumn":"tiles.loadedWorldColumn","tilemap\\s*\\.\\s*loadedWorldRow":"tiles.loadedWorldRow"}}],"0.0.0 - 1.9.0":[{"type":"api","map":{"myCorg\\s*\\.\\s*follow":"myCorg.cameraFollow"}}]},"switches":{},"jsRefCounting":false,"utf8":true},"compileService":{"buildEngine":"codal","githubCorePackage":"lancaster-university/codal","gittag":"v0.8.0","dockerImage":"pext/yotta:latest","codalTarget":{"branches":{}}},"variants":{"stm32f401":{"compile":{"hasHex":true,"openocdScript":"source [find interface/stlink-v2.cfg]; source [find target/stm32f4x.cfg]","flashEnd":524288,"uf2Family":"0x57755a57"},"compileService":{"codalTarget":{"name":"codal-big-brainpad","url":"https://github.com/lancaster-university/codal-big-brainpad","branch":"v1.3.1","type":"git"},"codalBinary":"STM32","serviceId":"codal2stm32","dockerImage":"pext/yotta:latest"}},"samd51":{"compile":{"hasHex":true,"openocdScript":"source [find interface/cmsis-dap.cfg]; set CHIPNAME at91samd51g19; source [find target/atsame5x.cfg]","openocdScriptAlt":"source [find interface/stlink-v2.cfg]; set CPUTAPID 0x2ba01477; set CHIPNAME at91samd51g19; source [find target/at91samdXX.cfg]","ramSize":196608,"flashEnd":524288,"uf2Family":"0x55114460"},"compileService":{"codalTarget":{"name":"codal-itsybitsy-m4","url":"https://github.com/lancaster-university/codal-itsybitsy-m4","branch":"v0.2.7","type":"git"},"codalBinary":"ITSYBITSY_M4","serviceId":"codal2samd51","dockerImage":"pext/yotta:latest"}},"nrf52840":{"compile":{"hasHex":true,"openocdScript":"source [find interface/cmsis-dap.cfg]; source [find target/nrf52.cfg]","webUSB":false,"flashEnd":1007616,"uf2Family":"0xada52840"},"compileService":{"codalTarget":{"name":"codal-nrf52840-dk","url":"https://github.com/mmoskal/codal-nrf52840-dk","branch":"v1.1.7","type":"git"},"codalBinary":"NRF52840_DK","serviceId":"codal2nrf52840","dockerImage":"pext/yotta:latest","yottaConfig":{"pxt":{"board":{"id":"BOARD_ID_NRF52840"}}}}},"nrf52833":{"compile":{"hasHex":true,"openocdScript":"source [find interface/cmsis-dap.cfg]; source [find target/nrf52.cfg]","webUSB":false,"useUF2":false,"flashEnd":524288,"deployDrives":".*","deployFileMarker":"DETAILS.TXT"},"compileService":{"codalTarget":{"name":"codal-nrf52833-dk","url":"https://github.com/mmoskal/codal-nrf52833-dk","branch":"v2.0.2","type":"git"},"codalBinary":"NRF52840_DK","serviceId":"codal2nrf52840","dockerImage":"pext/yotta:latest","yottaConfig":{"pxt":{"board":{"id":"BOARD_ID_NRF52833"}}}}},"rp2040":{"compile":{"hasHex":true,"openocdScript":"???","flashChecksumAddr":0,"flashEnd":2097152,"uf2Family":"0xe48bff56"},"compileService":{"codalTarget":{"name":"codal-pi-pico","url":"https://github.com/lancaster-university/codal-pi-pico","branch":"v0.0.13","type":"git"},"gittag":"v0.9.0","codalBinary":"PI-PICO","serviceId":"codal2pico","dockerImage":"pext/arm:gcc9"}},"rpi":{"compile":{"hasHex":true,"useELF":true,"runtimeIsARM":true,"flashCodeAlign":256,"webUSB":false,"stackAlign":2},"compileService":{"buildEngine":"dockermake","dockerImage":"pext/rpi:alsa","serviceId":"rpi"}},"vm":{"compile":{"hasHex":true,"useELF":true,"flashCodeAlign":256,"webUSB":false,"nativeType":"vm","stackAlign":2},"compileService":{"buildEngine":"dockercross","dockerImage":"pext/crossbuild","serviceId":"crossbuild","skipCloudBuild":true}}},"serial":{"useEditor":true,"log":true,"editorTheme":{"graphBackground":"#d9d9d9","lineColors":["#009DDC","#FB48C7","#40bf4a","#8073E5","#d25b33"]}},"runtime":{"mathBlocks":true,"loopsBlocks":true,"logicBlocks":true,"variablesBlocks":true,"textBlocks":true,"functionBlocks":true,"breakBlock":true,"continueBlock":true,"pauseUntilBlock":{"category":"loops"},"functionsOptions":{"useNewFunctions":true,"extraFunctionEditorTypes":[{"typeName":"Sprite","icon":"send","defaultName":"mySprite"},{"typeName":"Image","icon":"image outline","defaultName":"myImage"}]},"listsBlocks":true,"tilesetFieldEditorIdentity":"images._tile","bannedCategories":["pins","control","input","serial","power"]},"simulator":{"autoRun":true,"autoRunLight":false,"emptyRunCode":"pxsim.pxtcore.updateScreen(new pxsim.RefImage(160, 120, 4))","aspectRatio":0.85,"dynamicBoardDefinition":true,"keymap":true,"messageSimulators":{"jacdac":{"url":"https://microsoft.github.io/jacdac-docs/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","localHostUrl":"http://localhost:8000/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","aspectRatio":"0.89","permanent":true}}},"queryVariants":{"skillsMap=1":{"appTheme":{"embeddedTutorial":true,"allowParentController":true,"shareFinishedTutorials":false}}},"unsupportedBrowsers":[{"id":"ie"}],"uploadDocs":true,"defaultBadges":[{"id":"skillmap-completion-save the forest","type":"skillmap-completion","image":"/static/badges/badge-forest.png","lockedImage":"/static/badges/badge-forest-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/forest","title":"Save the Forest"},{"id":"skillmap-completion-zookeeper","type":"skillmap-completion","image":"/static/badges/badge-zoo.png","lockedImage":"/static/badges/badge-zoo-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/zoo","title":"Zookeeper"},{"id":"skillmap-completion-rockstar","image":"/static/badges/badge-rockstar.png","lockedImage":"/static/badges/badge-rockstar-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/rockstar","type":"skillmap-completion","title":"80's Rockstar"},{"id":"skillmap-completion-build a platformer game!","image":"/static/badges/badge-jungle.png","lockedImage":"/static/badges/badge-jungle-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/jungle","type":"skillmap-completion","title":"Jungle Monkey"},{"id":"skillmap-completion-space","image":"/static/badges/badge-space.png","lockedImage":"/static/badges/badge-space-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/space","type":"skillmap-completion","title":"Space Explorer"},{"id":"skillmap-completion-shark","image":"/static/badges/badge-shark.png","lockedImage":"/static/badges/badge-shark-locked.png","sourceURL":"https://www.makecode.com/api/md/arcade/skillmap/shark","type":"skillmap-completion","title":"Shark Splash"}],"versions":{"branch":"v1.13.12","tag":"v1.13.12","commits":"https://github.com/microsoft/pxt-arcade/commits/19955352b7e8739a135d040a802d792529785ce5","target":"1.13.12","pxt":"8.6.14"},"blocksprj":{"id":"blocksprj","config":{"name":"{0}","dependencies":{"device":"*"},"description":"","files":["main.blocks","main.ts","README.md","assets.json"],"additionalFilePaths":[]},"files":{"README.md":" ","assets.json":"","main.blocks":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables></variables>\n <block type=\"pxt-on-start\" x=\"0\" y=\"0\"></block>\n</xml>","main.ts":" "}},"tsprj":{"id":"tsprj","config":{"name":"{0}","dependencies":{"device":"*"},"description":"","files":["main.ts","README.md","assets.json"],"additionalFilePaths":[]},"files":{"README.md":" ","assets.json":"","main.ts":" "}}}
|
package/built/theme.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"logoUrl":"https://makecode.com/org","logo":"/static/logo.svg","docsLogo":"/static/logo.svg","cardLogo":"/static/logo.png","portraitLogo":"/static/logo.svg","footerLogo":"/static/logo.svg","organization":"Microsoft MakeCode","organizationText":"MakeCode Arcade","organizationShortText":"MakeCode","organizationUrl":"https://makecode.com/org","organizationLogo":"/static/Micorsoft_logo_rgb_W-white_D-square.png","organizationWideLogo":"/static/Micorsoft_logo_rgb_W-white_D.png","homeUrl":"https://arcade.makecode.com/","embedUrl":"https://arcade.makecode.com/","privacyUrl":"https://go.microsoft.com/fwlink/?LinkId=521839","termsOfUseUrl":"https://go.microsoft.com/fwlink/?LinkID=206977","githubUrl":"https://github.com/microsoft/pxt-arcade","boardName":"Arcade","addNewTypeScriptFile":true,"docMenu":[{"name":"Docs","path":"/docs","popout":true},{"name":"Hardware","path":"/hardware","popout":true},{"name":"Forum","path":"https://forum.makecode.com"}],"coloredToolbox":true,"monacoToolbox":true,"selectLanguage":true,"availableLocales":["en","ar","zh-CN","zh-TW","de","fr","ja","es-ES","es-MX"],"invertedMenu":true,"showHomeScreen":true,"useTextLogo":true,"highContrast":true,"greenScreen":true,"print":true,"hasAudio":true,"allowPackageExtensions":true,"homeScreenHero":{"imageUrl":"/static/hero-gallery/multiplayer-banner.png","name":"Multiplayer Games!","url":"
|
|
1
|
+
{"logoUrl":"https://makecode.com/org","logo":"/static/logo.svg","docsLogo":"/static/logo.svg","cardLogo":"/static/logo.png","portraitLogo":"/static/logo.svg","footerLogo":"/static/logo.svg","organization":"Microsoft MakeCode","organizationText":"MakeCode Arcade","organizationShortText":"MakeCode","organizationUrl":"https://makecode.com/org","organizationLogo":"/static/Micorsoft_logo_rgb_W-white_D-square.png","organizationWideLogo":"/static/Micorsoft_logo_rgb_W-white_D.png","homeUrl":"https://arcade.makecode.com/","embedUrl":"https://arcade.makecode.com/","privacyUrl":"https://go.microsoft.com/fwlink/?LinkId=521839","termsOfUseUrl":"https://go.microsoft.com/fwlink/?LinkID=206977","githubUrl":"https://github.com/microsoft/pxt-arcade","boardName":"Arcade","addNewTypeScriptFile":true,"docMenu":[{"name":"Docs","path":"/docs","popout":true},{"name":"Hardware","path":"/hardware","popout":true},{"name":"Forum","path":"https://forum.makecode.com"}],"coloredToolbox":true,"monacoToolbox":true,"selectLanguage":true,"availableLocales":["en","ar","zh-CN","zh-TW","de","fr","ja","es-ES","es-MX"],"invertedMenu":true,"showHomeScreen":true,"useTextLogo":true,"highContrast":true,"greenScreen":true,"print":true,"hasAudio":true,"allowPackageExtensions":true,"homeScreenHero":{"imageUrl":"/static/hero-gallery/multiplayer-banner.png","name":"Multiplayer Games!","url":"/--multiplayer","buttonLabel":"Try Now","description":"Multiplayer Games!","cardType":"link"},"homeScreenHeroGallery":"/hero-banner","socialOptions":{"orgTwitterHandle":"MSMakeCode","hashtags":"MakeCode","discourse":"https://forum.makecode.com/","discourseCategory":"Arcade"},"blocklyOptions":{"grid":{"spacing":20,"length":100,"colour":"rgba(107, 79, 118, 0.10)","snap":true}},"blockColors":{"loops":"#20BF6B","logic":"#45AAF2","math":"#A55EEA","variables":"#EC3B59","text":"#F5D547","arrays":"#FF8F08","functions":"#1446A0"},"simAnimationEnter":"fly right in","simAnimationExit":"fly right out","crowdinProject":"makecode","monacoColors":{"editor.background":"#FEF3E0"},"monacoFieldEditors":["image-editor","tilemap-editor","soundeffect-editor","music-editor"],"scriptManager":true,"saveInMenu":false,"debugger":true,"importExtensionFiles":true,"experiments":["debugExtensionCode","snippetBuilder","experimentalHw","recipes","tutorialBlocksDiff","blocksErrorList","identity","accessibleBlocks","palettePicker"],"blocksCollapsing":true,"errorList":true,"workspaceSearch":true,"extendEditor":true,"simScreenshot":true,"simScreenshotKey":"P","simScreenshotMaxUriLength":300000,"simGif":true,"simGifKey":"R","qrCode":true,"shareFinishedTutorials":true,"nameProjectFirst":true,"githubEditor":true,"githubCompiledJs":true,"chooseLanguageRestrictionOnNewProject":true,"openProjectNewTab":true,"hasReferenceDocs":true,"python":true,"assetEditor":true,"immersiveReader":true,"tutorialCodeValidation":true,"multiplayer":true,"songEditor":true,"shareToKiosk":true,"TOC":[{"name":"About","path":"/about","subitems":[]},{"name":"FAQ","path":"/faq","subitems":[]},{"name":"Projects","path":"/projects","subitems":[]},{"name":"GitHub","path":"/github","subitems":[]},{"name":"Reference","path":"/reference","subitems":[{"name":"sprites","path":"/reference/sprites","subitems":[]},{"name":"controller","path":"/reference/controller","subitems":[]},{"name":"game","path":"/reference/game","subitems":[]},{"name":"music","path":"/reference/music","subitems":[]},{"name":"scene","path":"/reference/scene","subitems":[]},{"name":"info","path":"/reference/info","subitems":[]},{"name":"images","path":"/reference/images","subitems":[]}]},{"name":"Blocks","path":"/blocks","subitems":[{"name":"On Start","path":"/blocks/on-start","subitems":[]},{"name":"Loops","path":"/blocks/loops","subitems":[{"name":"repeat","path":"/blocks/loops/repeat","subitems":[]},{"name":"for","path":"/blocks/loops/for","subitems":[]},{"name":"while","path":"/blocks/loops/while","subitems":[]},{"name":"for of","path":"/blocks/loops/for-of","subitems":[]}]},{"name":"Logic","path":"/blocks/logic","subitems":[{"name":"if","path":"/blocks/logic/if","subitems":[]},{"name":"Boolean","path":"/blocks/logic/boolean","subitems":[]}]},{"name":"Variables","path":"/blocks/variables","subitems":[{"name":"assign","path":"/blocks/variables/assign","subitems":[]},{"name":"change var","path":"/blocks/variables/change","subitems":[]},{"name":"var","path":"/blocks/variables/var","subitems":[]}]},{"name":"Math","path":"/blocks/math","subitems":[]},{"name":"JavaScript blocks","path":"/blocks/javascript-blocks","subitems":[]},{"name":"Custom blocks","path":"/blocks/custom","subitems":[]}]},{"name":"Python","path":"/python","subitems":[{"name":"Calling","path":"/python/call","subitems":[]},{"name":"Sequencing","path":"/python/sequence","subitems":[]},{"name":"Variables","path":"/python/variables","subitems":[]},{"name":"Operators","path":"/python/operators","subitems":[]},{"name":"Statements","path":"/python/statements","subitems":[]},{"name":"Functions","path":"/python/functions","subitems":[]},{"name":"Classes","path":"/python/classes","subitems":[]}]},{"name":"JavaScript","path":"/javascript","subitems":[{"name":"Calling","path":"/javascript/call","subitems":[]},{"name":"Sequencing","path":"/javascript/sequence","subitems":[]},{"name":"Variables","path":"/javascript/variables","subitems":[]},{"name":"Operators","path":"/javascript/operators","subitems":[]},{"name":"Statements","path":"/javascript/statements","subitems":[]},{"name":"Functions","path":"/javascript/functions","subitems":[]},{"name":"Types","path":"/javascript/types","subitems":[]},{"name":"Classes","path":"/javascript/classes","subitems":[]},{"name":"Interfaces","path":"/javascript/interfaces","subitems":[]},{"name":"Generics","path":"/javascript/generics","subitems":[]}]},{"name":"Types","path":"/types","subitems":[{"name":"Number","path":"/types/number","subitems":[]},{"name":"String","path":"/types/string","subitems":[]},{"name":"Boolean","path":"/types/boolean","subitems":[]},{"name":"Array","path":"/types/array","subitems":[]},{"name":"Function","path":"/types/function","subitems":[]},{"name":"Image","path":"/types/image","subitems":[]},{"name":"Sprite","path":"/types/sprite","subitems":[]}]},{"name":"Blocks Gallery","path":"/block-gallery","subitems":[]},{"name":"Miscellaneous","path":"","subitems":[{"name":"About","path":"/about","subitems":[]},{"name":"Support","path":"/support","subitems":[]},{"name":"Translate","path":"/translate","subitems":[]},{"name":"Sharing projects","path":"/share","subitems":[]},{"name":"Multiplayer","path":"/multiplayer","subitems":[]},{"name":"Offline support","path":"/offline","subitems":[]},{"name":"Save","path":"/save","subitems":[]},{"name":"Sign In","path":"/identity/sign-in","subitems":[]},{"name":"Cloud Sync","path":"/identity/cloud-sync","subitems":[]},{"name":"VS Code","path":"/vscode","subitems":[]}]},{"name":"Hardware","path":"/hardware","subitems":[{"name":"Errors","path":"/hardware/errors","subitems":[]},{"name":"Adding New Board","path":"/hardware/adding","subitems":[]},{"name":"Raspberry Pi","path":"/hardware/raspberry-pi","subitems":[]},{"name":"Makey Makey","path":"/hardware/makey-makey","subitems":[]},{"name":"Shoebox Controller","path":"/hardware/shoebox-controller","subitems":[]},{"name":"Dev","path":"/hardware/dev","subitems":[]},{"name":"Debug connector","path":"/hardware/dbg","subitems":[]}]},{"name":"Developers","path":"","subitems":[{"name":"Command Line Interface","path":"/cli","subitems":[]},{"name":"Visual Studio Code support","path":"/code","subitems":[]},{"name":"Blocks Embed","path":"/blocks-embed","subitems":[]}]},{"name":"Lessons","path":"/lessons","subitems":[{"name":"Cherry Pickr","path":"/lessons/cherry-pickr","subitems":[]},{"name":"Barrel Dodger","path":"/lessons/barrel-dodger","subitems":[]},{"name":"Dance Party","path":"/lessons/dance-party","subitems":[]},{"name":"BlockOut","path":"/lessons/block-out","subitems":[]}]},{"name":"Courses","path":"/courses","subitems":[{"name":"CS Intro 1","path":"/courses/csintro1","subitems":[]},{"name":"CS Intro 2","path":"/courses/csintro2","subitems":[]},{"name":"CS Intro 3","path":"/courses/csintro3","subitems":[]}]}],"id":"arcade","title":"Microsoft MakeCode Arcade","name":"arcade","description":"Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor","htmlDocIncludes":{}}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## {Step 1 @fullscreen}
|
|
10
10
|
|
|
11
|
-
Find ``||variables:set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``.
|
|
11
|
+
Find ``||variables(sprites):set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``.
|
|
12
12
|
|
|
13
13
|
```blocks
|
|
14
14
|
let mySprite = sprites.create(img`
|
|
@@ -33,7 +33,7 @@ let mySprite = sprites.create(img`
|
|
|
33
33
|
|
|
34
34
|
## {Step 2 @fullscreen}
|
|
35
35
|
|
|
36
|
-
Click on the grey box in ``||variables:set mySprite to||`` to open the image editor. Open the Gallery, scroll to find the image of a burger, and click on the image of a burger to select that image.
|
|
36
|
+
Click on the grey box in ``||variables(sprites):set mySprite to||`` to open the image editor. Open the Gallery, scroll to find the image of a burger, and click on the image of a burger to select that image.
|
|
37
37
|
|
|
38
38
|
This will set the image of the ``||sprites:Sprite||`` to a burger; run the code and make sure you see it on the screen!
|
|
39
39
|
|
|
@@ -77,7 +77,7 @@ f 6 6 d d f f f f f e e e f f e f f e e e e e f f e e d b 4 6 e
|
|
|
77
77
|
|
|
78
78
|
## {Step 3 @fullscreen}
|
|
79
79
|
|
|
80
|
-
Find ``||sprites:set mySprite x to 0||`` in ``||sprites:Sprites||``. Place it after ``||variables:set mySprite to||``, and change ``||sprites:x||`` to ``||sprites:vx||``. Change the 0 to 40.
|
|
80
|
+
Find ``||sprites:set mySprite x to 0||`` in ``||sprites:Sprites||``. Place it after ``||variables(sprites):set mySprite to||``, and change ``||sprites:x||`` to ``||sprites:vx||``. Change the 0 to 40.
|
|
81
81
|
|
|
82
82
|
This will make the sprite move to the **right** across the screen, because the ``||sprites:x||`` position will be **increasing**.
|
|
83
83
|
|
|
@@ -122,7 +122,7 @@ mySprite.vx = 40;
|
|
|
122
122
|
|
|
123
123
|
## {Step 4 @fullscreen}
|
|
124
124
|
|
|
125
|
-
Find ``||sprites:set mySprite x to 0||`` in ``||sprites:Sprites||``. Place it after ``||variables:set mySprite to||``, and change ``||sprites:x||`` to ``||sprites:vy||``. Change the 0 to 60.
|
|
125
|
+
Find ``||sprites:set mySprite x to 0||`` in ``||sprites:Sprites||``. Place it after ``||variables(sprites):set mySprite to||``, and change ``||sprites:x||`` to ``||sprites:vy||``. Change the 0 to 60.
|
|
126
126
|
|
|
127
127
|
This will make the sprite move **downwards** across the screen, because the ``||sprites:y||`` position will be **increasing**.
|
|
128
128
|
|
|
@@ -168,7 +168,7 @@ mySprite.vy = 60
|
|
|
168
168
|
|
|
169
169
|
## {Step 5 @fullscreen}
|
|
170
170
|
|
|
171
|
-
Find ``||sprites:set mySprite bounce on wall||`` in ``||sprites:Sprites||``. Place it after ``||variables:set mySprite to||``.
|
|
171
|
+
Find ``||sprites:set mySprite bounce on wall||`` in ``||sprites:Sprites||``. Place it after ``||variables(sprites):set mySprite to||``.
|
|
172
172
|
|
|
173
173
|
This will make it so that when the burger its a wall, it will 'bounce' off the wall, changing the ``||sprites:vx||`` or ``||sprites:vy||``
|
|
174
174
|
|
|
@@ -58,7 +58,7 @@ for (let value of tiles.getTilesByType(sprites.castle.tileDarkGrass2)) {
|
|
|
58
58
|
|
|
59
59
|
## {Step 5}
|
|
60
60
|
|
|
61
|
-
Find ``||sprites:set mySprite to sprite of kind player||`` in ``||sprites:Sprites||``
|
|
61
|
+
Find ``||variables(sprites):set mySprite to sprite of kind player||`` in ``||sprites:Sprites||``
|
|
62
62
|
and drag it into the ``||loops:for element||`` loop.
|
|
63
63
|
Draw breadcrumbs for the image of the sprite.
|
|
64
64
|
This will create a new ``||sprites:Sprite||`` for every one of the
|
|
@@ -92,9 +92,9 @@ for (let value of tiles.getTilesByType(sprites.castle.tileDarkGrass2)) {
|
|
|
92
92
|
## {Step 6}
|
|
93
93
|
|
|
94
94
|
Find ``||scene:place mySprite on top of tilemap col row||``
|
|
95
|
-
and place it after ``||sprites:set mySprite to||``.
|
|
95
|
+
and place it after ``||variables(sprites):set mySprite to||``.
|
|
96
96
|
Drag ``||variables:value||`` from the ``||loops:for loop||`` to ``||variables:tilemap col row||``.
|
|
97
|
-
Make sure ``||variables:mySprite||`` is the ``||variables:variable||`` for the
|
|
97
|
+
Make sure ``||variables(noclick):mySprite||`` is the ``||variables:variable||`` for the
|
|
98
98
|
``||sprites:sprite||`` you just created.
|
|
99
99
|
This will place the breadcrumbs on each ``||scene:tile||`` of the diagonal line.
|
|
100
100
|
|
|
@@ -129,7 +129,7 @@ for (let value of tiles.getTilesByType(sprites.castle.tileDarkGrass2)) {
|
|
|
129
129
|
If you want to make the tile below the sprite look the same as the others
|
|
130
130
|
so that it doesn't stand out from other tiles,
|
|
131
131
|
find ``||scene:set at tilemap col row||`` in ``||scene:Scene||``
|
|
132
|
-
and place it after ``||variables:set mySprite to||``.
|
|
132
|
+
and place it after ``||variables(sprites):set mySprite to||``.
|
|
133
133
|
Drag ``||variables:value||`` on top of ``||scene:tilemap col row||``,
|
|
134
134
|
and select the tile you want the tile to become (in this case, the same as the other tiles).
|
|
135
135
|
|
|
@@ -12,7 +12,7 @@ A ``||sprites:y||`` position of 0 will place the sprite at the **top** of the sc
|
|
|
12
12
|
|
|
13
13
|
## {Step 1}
|
|
14
14
|
|
|
15
|
-
Find ``||variables:set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``. Click on ``||variables:mySprite||``, select ``rename variable...``, and change the name from ``||variables:mySprite||`` to ``||variables:cherry||``.
|
|
15
|
+
Find ``||variables(sprites):set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``. Click on ``||variables(noclick):mySprite||``, select ``rename variable...``, and change the name from ``||variables(noclick):mySprite||`` to ``||variables(noclick):cherry||``.
|
|
16
16
|
|
|
17
17
|
```blocks
|
|
18
18
|
let cherry = sprites.create(img`
|
|
@@ -37,7 +37,7 @@ let cherry = sprites.create(img`
|
|
|
37
37
|
|
|
38
38
|
## {Step 2 @fullscreen}
|
|
39
39
|
|
|
40
|
-
Open the image editor for ``||variables:cherry||``. You can either draw your own image of a cherry, or open the Gallery and find a premade picture in there.
|
|
40
|
+
Open the image editor for ``||variables(noclick):cherry||``. You can either draw your own image of a cherry, or open the Gallery and find a premade picture in there.
|
|
41
41
|
|
|
42
42
|
```blocks
|
|
43
43
|
let cherry: Sprite = null
|
|
@@ -63,9 +63,9 @@ c 2 e e 2 2 2 2 e 2 5 4 2 c 8 .
|
|
|
63
63
|
|
|
64
64
|
## {Step 3 @fullscreen}
|
|
65
65
|
|
|
66
|
-
Find ``||sprites:set mySprite position to x 0 y 0||`` in ``||sprites:Sprites||``. Change ``||variables:mySprite||`` to ``||variables:cherry||``, and change ``||sprites:x||`` to 25.
|
|
66
|
+
Find ``||sprites:set mySprite position to x 0 y 0||`` in ``||sprites:Sprites||``. Change ``||variables(noclick):mySprite||`` to ``||variables(noclick):cherry||``, and change ``||sprites:x||`` to 25.
|
|
67
67
|
|
|
68
|
-
This will place the ``||variables:cherry||`` at the top of the screen, a little bit away (25 pixels) from the left side.
|
|
68
|
+
This will place the ``||variables(noclick):cherry||`` at the top of the screen, a little bit away (25 pixels) from the left side.
|
|
69
69
|
|
|
70
70
|
```blocks
|
|
71
71
|
let cherry: Sprite = null
|
|
@@ -121,7 +121,7 @@ cherry.setPosition(25, 45)
|
|
|
121
121
|
|
|
122
122
|
## {Step 5}
|
|
123
123
|
|
|
124
|
-
Create another ``||sprites:Sprite||``, and rename it ``||variables:chicken||``. Find (or create) an image of chicken to represent it.
|
|
124
|
+
Create another ``||sprites:Sprite||``, and rename it ``||variables(noclick):chicken||``. Find (or create) an image of chicken to represent it.
|
|
125
125
|
|
|
126
126
|
```blocks
|
|
127
127
|
let chicken: Sprite = null
|
|
@@ -167,7 +167,7 @@ chicken = sprites.create(img`
|
|
|
167
167
|
|
|
168
168
|
## {Step 6}
|
|
169
169
|
|
|
170
|
-
Set the ``||variables:chicken||``'s ``||sprites:x||`` position 120, and it's ``||sprites:y||`` position to 80.
|
|
170
|
+
Set the ``||variables(noclick):chicken||``'s ``||sprites:x||`` position 120, and it's ``||sprites:y||`` position to 80.
|
|
171
171
|
|
|
172
172
|
```blocks
|
|
173
173
|
let chicken: Sprite = null
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## {Step 1 @fullscreen}
|
|
10
10
|
|
|
11
|
-
Find ``||variables:set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``. Click on ``||variables:mySprite||``, select ``rename variable...``, and change the name from ``||variables:mySprite||`` to ``||variables:princess||``.
|
|
11
|
+
Find ``||variables(sprites):set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``. Click on ``||variables:mySprite||``, select ``rename variable...``, and change the name from ``||variables:mySprite||`` to ``||variables:princess||``.
|
|
12
12
|
|
|
13
13
|
```blocks
|
|
14
14
|
let princess = sprites.create(img`
|
|
@@ -86,7 +86,7 @@ controller.moveSprite(princess)
|
|
|
86
86
|
|
|
87
87
|
## {Step 4 @fullscreen}
|
|
88
88
|
|
|
89
|
-
Find ``||variables:set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``. Rename ``||variables:mySprite||`` to ``||variables:pizza||``. Open the image editor, and select or create an image of a pizza.
|
|
89
|
+
Find ``||variables(sprites):set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``. Rename ``||variables:mySprite||`` to ``||variables:pizza||``. Open the image editor, and select or create an image of a pizza.
|
|
90
90
|
|
|
91
91
|
```blocks
|
|
92
92
|
let pizza: Sprite = null
|
|
@@ -132,7 +132,7 @@ b 5 5 5 5 d d 4 4 4 4 . . . . .
|
|
|
132
132
|
|
|
133
133
|
## {Step 5 @fullscreen}
|
|
134
134
|
|
|
135
|
-
Find ``||sprites:set mySprite position to x 0 y 0||`` in ``||sprites:Sprites||``. Change ``||variables:mySprite||`` to ``||variables:pizza||``, ``||sprites:x||`` to 140, and ``||sprites:y||`` to 100.
|
|
135
|
+
Find ``||sprites:set mySprite position to x 0 y 0||`` in ``||sprites:Sprites||``. Change ``||variables(noclick):mySprite||`` to ``||variables(noclick):pizza||``, ``||sprites:x||`` to 140, and ``||sprites:y||`` to 100.
|
|
136
136
|
|
|
137
137
|
```blocks
|
|
138
138
|
let pizza: Sprite = null
|
|
@@ -332,4 +332,4 @@ pizza.setPosition(140, 100)
|
|
|
332
332
|
|
|
333
333
|
## {Complete}
|
|
334
334
|
|
|
335
|
-
Congratulations, your game is complete! The player can move the ``||variables:princess||`` around as long as they want, so long as they avoid the ``||variables:pizza||``.
|
|
335
|
+
Congratulations, your game is complete! The player can move the ``||variables(noclick):princess||`` around as long as they want, so long as they avoid the ``||variables(noclick):pizza||``.
|
|
@@ -29,7 +29,7 @@ tiles.setTilemap(tilemap`level_0`)
|
|
|
29
29
|
|
|
30
30
|
## {Step 3 @fullscreen}
|
|
31
31
|
|
|
32
|
-
Find ``||variables:set mySprite to||`` and drag it into ``||loops:on start||`` to create a ``||sprites:Sprite||``. Open the image editor for the ``||sprites:Sprite||`` and create an image to represent it on the screen.
|
|
32
|
+
Find ``||variables(sprites):set mySprite to||`` and drag it into ``||loops:on start||`` to create a ``||sprites:Sprite||``. Open the image editor for the ``||sprites:Sprite||`` and create an image to represent it on the screen.
|
|
33
33
|
|
|
34
34
|
```blocks
|
|
35
35
|
tiles.setTilemap(tilemap`level_0`)
|
|
@@ -55,7 +55,7 @@ let mySprite = sprites.create(img`
|
|
|
55
55
|
|
|
56
56
|
## {Step 4 @fullscreen}
|
|
57
57
|
|
|
58
|
-
Find ``||controller:move mySprite with buttons||`` and drag it into ``||loops:on start||`` after ``||variables:set mySprite to||``.
|
|
58
|
+
Find ``||controller:move mySprite with buttons||`` and drag it into ``||loops:on start||`` after ``||variables(sprites):set mySprite to||``.
|
|
59
59
|
|
|
60
60
|
This lets the player move the character around the map that is displayed on the screen. However, there is one issue; the player can move straight through the beautiful tiles we designed! This is fixed by changing all of them to be ``||scene:Wall||`` tiles.
|
|
61
61
|
|
|
@@ -10,7 +10,7 @@ This allows you to easily create things like asteroids that move across the scre
|
|
|
10
10
|
|
|
11
11
|
## {Step 1 @fullscreen}
|
|
12
12
|
|
|
13
|
-
Find ``||variables:set mySprite to||`` in ``||sprites:Sprites||`` and drag it into the ``||loops:on start||``. Open the image editor for ``||variables:mySprite||`` and select or create an image of a skeleton.
|
|
13
|
+
Find ``||variables(sprites):set mySprite to||`` in ``||sprites:Sprites||`` and drag it into the ``||loops:on start||``. Open the image editor for ``||variables(noclick):mySprite||`` and select or create an image of a skeleton.
|
|
14
14
|
|
|
15
15
|
```blocks
|
|
16
16
|
let mySprite = sprites.create(img`
|
|
@@ -43,7 +43,7 @@ let mySprite = sprites.create(img`
|
|
|
43
43
|
|
|
44
44
|
## {Step 2 @fullscreen}
|
|
45
45
|
|
|
46
|
-
Find ``||sprites:projectile from mySprite||`` in ``||sprites:Sprites||`` and drag it into the ``||loops:on start||`` **after** ``||variables:set mySprite to||``.
|
|
46
|
+
Find ``||sprites:projectile from mySprite||`` in ``||sprites:Sprites||`` and drag it into the ``||loops:on start||`` **after** ``||variables(sprites):set mySprite to||``.
|
|
47
47
|
|
|
48
48
|
This will create a ``||sprites:Sprite||`` that starts in the same location as ``||sprites:mySprite||``, no matter where it is on the screen.
|
|
49
49
|
|
|
@@ -96,7 +96,7 @@ let projectile = sprites.createProjectileFromSprite(img`
|
|
|
96
96
|
|
|
97
97
|
## {Step 3 @fullscreen}
|
|
98
98
|
|
|
99
|
-
Open the image editor for ``||variables:projectile||`` and draw an image of a bone.
|
|
99
|
+
Open the image editor for ``||variables(sprites):projectile||`` and draw an image of a bone.
|
|
100
100
|
|
|
101
101
|
```blocks
|
|
102
102
|
let mySprite = sprites.create(img`
|
|
@@ -198,9 +198,9 @@ let projectile = sprites.createProjectileFromSprite(img`
|
|
|
198
198
|
|
|
199
199
|
## {Step 5 @fullscreen}
|
|
200
200
|
|
|
201
|
-
Find ``||controller:on A button pressed||`` in ``||controller:Controller||`` and drag it into the workspace. Drag ``||variables:set projectile to||`` from ``||loops:on start||`` into ``||controller:on A button pressed||``.
|
|
201
|
+
Find ``||controller:on A button pressed||`` in ``||controller:Controller||`` and drag it into the workspace. Drag ``||variables(sprites):set projectile to||`` from ``||loops:on start||`` into ``||controller:on A button pressed||``.
|
|
202
202
|
|
|
203
|
-
This will create an event that occurs whenever the person playing the game presses the ``||controller:A||`` button. Whenever that event occurs, ``||variables:mySprite||`` will 'throw' a new bone up and to the right.
|
|
203
|
+
This will create an event that occurs whenever the person playing the game presses the ``||controller:A||`` button. Whenever that event occurs, ``||variables(noclick):mySprite||`` will 'throw' a new bone up and to the right.
|
|
204
204
|
|
|
205
205
|
```blocks
|
|
206
206
|
let mySprite = sprites.create(img`
|
|
@@ -10,7 +10,7 @@ In this tutorial, you will create the main character for a game, and allow them
|
|
|
10
10
|
|
|
11
11
|
## {Step 1 @fullscreen}
|
|
12
12
|
|
|
13
|
-
Find ``||variables:set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``.
|
|
13
|
+
Find ``||variables(sprites):set mySprite to||`` in ``||sprites:Sprites||``. Drag it into the ``||loops:on start||``.
|
|
14
14
|
|
|
15
15
|
This ``||sprites:Sprite||`` will represent the main character in the game; for now, it has no image and doesn't do anything, though.
|
|
16
16
|
|
|
@@ -37,7 +37,7 @@ let mySprite = sprites.create(img`
|
|
|
37
37
|
|
|
38
38
|
## {Step 2 @fullscreen}
|
|
39
39
|
|
|
40
|
-
Click on the grey box in ``||variables:set mySprite to||`` to open the image editor. Use it to draw an image to represent your new sprite on the screen.
|
|
40
|
+
Click on the grey box in ``||variables(sprites):set mySprite to||`` to open the image editor. Use it to draw an image to represent your new sprite on the screen.
|
|
41
41
|
|
|
42
42
|
When you close the image editor by clicking outside of it, the image you drew will show up in the center of the screen in the simulator.
|
|
43
43
|
|
|
@@ -67,7 +67,7 @@ mySprite = sprites.create(img`
|
|
|
67
67
|
|
|
68
68
|
This ``||sprites:Sprite||`` represents the main character in our game, so it should move when the player presses buttons.
|
|
69
69
|
|
|
70
|
-
Find ``||controller:move mySprite with buttons||`` in ``||controller:Controller||``. Place it after ``||variables:set mySprite to||``.
|
|
70
|
+
Find ``||controller:move mySprite with buttons||`` in ``||controller:Controller||``. Place it after ``||variables(sprites):set mySprite to||``.
|
|
71
71
|
|
|
72
72
|
```blocks
|
|
73
73
|
let mySprite: Sprite = null
|
|
@@ -6,7 +6,7 @@ Make an action game where the player has to react quickly to avoid fast moving b
|
|
|
6
6
|
|
|
7
7
|
## Step 1
|
|
8
8
|
|
|
9
|
-
OK, let's get started by making our ``Player`` sprite. Start by placing a ``||variables:set mySprite to||`` block in an ``||loops:on start||`` block to create your sprite.
|
|
9
|
+
OK, let's get started by making our ``Player`` sprite. Start by placing a ``||variables(sprites):set mySprite to||`` block in an ``||loops:on start||`` block to create your sprite.
|
|
10
10
|
|
|
11
11
|
```blocks
|
|
12
12
|
let mySprite: Sprite = sprites.create(img``, SpriteKind.Player)
|
|
@@ -46,7 +46,7 @@ mySprite.setPosition(20, 70)
|
|
|
46
46
|
|
|
47
47
|
## Step 4
|
|
48
48
|
|
|
49
|
-
Drag a ``||sprites:set mySprite x||`` into the ``||loops:on start||``, click the dropdown, and select ``ay (acceleration y)``. Set the value to `500` so that character is pulled down by "gravity".
|
|
49
|
+
Drag a ``||variables(sprites):set mySprite x||`` into the ``||loops:on start||``, click the dropdown, and select ``ay (acceleration y)``. Set the value to `500` so that character is pulled down by "gravity".
|
|
50
50
|
|
|
51
51
|
```blocks
|
|
52
52
|
let mySprite: Sprite = sprites.create(img`
|
|
@@ -149,7 +149,7 @@ game.onUpdateInterval(1500, function () {
|
|
|
149
149
|
|
|
150
150
|
Find ``||scene:place mySprite on top of tilemap col row||`` and drag it into the ``||game:on game update interval||`` after ``||variables:set projectile to||``.
|
|
151
151
|
Set the ``||scene:col||`` to 9 and the ``||scene:row||`` to 5, which is the tile on the right side of the screen directly above the wall.
|
|
152
|
-
Change ``||variables:mySprite||`` to ``||variables:projectile||``, so that it refers to the sprite that was just created.
|
|
152
|
+
Change ``||variables(noclick):mySprite||`` to ``||variables(noclick):projectile||``, so that it refers to the sprite that was just created.
|
|
153
153
|
|
|
154
154
|
```blocks
|
|
155
155
|
game.onUpdateInterval(1500, function () {
|
|
@@ -11,9 +11,9 @@ Try these multiplayer games with your friends!
|
|
|
11
11
|
* actionIcon: xicon multiplayer
|
|
12
12
|
* imageUrl: /static/multiplayer/perfect-fit.png
|
|
13
13
|
* largeImageUrl: /static/multiplayer/perfect-fit.gif
|
|
14
|
-
* url:
|
|
14
|
+
* url: /--multiplayer?host=_bz3CCuWFiepH
|
|
15
15
|
* cardType: link
|
|
16
|
-
* otherAction:
|
|
16
|
+
* otherAction: /_bz3CCuWFiepH, , sharedExample
|
|
17
17
|
---
|
|
18
18
|
* name: Galga
|
|
19
19
|
* description: Controlling a starship, up to 4 players can help destroy the Galga forces, while avoiding enemies. Each player has 3 lives, last player alive wins the game!
|
|
@@ -21,9 +21,9 @@ Try these multiplayer games with your friends!
|
|
|
21
21
|
* actionIcon: xicon multiplayer
|
|
22
22
|
* imageUrl: /static/multiplayer/galga.png
|
|
23
23
|
* largeImageUrl: /static/multiplayer/galga.gif
|
|
24
|
-
* url:
|
|
24
|
+
* url: /--multiplayer?host=_C71PmfFaYDm2
|
|
25
25
|
* cardType: link
|
|
26
|
-
* otherAction:
|
|
26
|
+
* otherAction: /_C71PmfFaYDm2, , sharedExample
|
|
27
27
|
---
|
|
28
28
|
* name: Arrow Battle
|
|
29
29
|
* description: 2-4 people can play to see who's the quickest at matching the arrow directions.
|
|
@@ -31,9 +31,9 @@ Try these multiplayer games with your friends!
|
|
|
31
31
|
* actionIcon: xicon multiplayer
|
|
32
32
|
* imageUrl: /static/multiplayer/arrow-battle.gif
|
|
33
33
|
* largeImageUrl: /static/multiplayer/arrow-battle-large.gif
|
|
34
|
-
* url:
|
|
34
|
+
* url: /--multiplayer?host=_dCP7f8c3q5PJ
|
|
35
35
|
* cardType: link
|
|
36
|
-
* otherAction:
|
|
36
|
+
* otherAction: /_dCP7f8c3q5PJ, , sharedExample
|
|
37
37
|
---
|
|
38
38
|
* name: Tag
|
|
39
39
|
* description: When you're it, tag a friend and they will lose a life. Be careful, if time runs out you'll lose a life instead! Up to 4 people can play.
|
|
@@ -41,9 +41,9 @@ Try these multiplayer games with your friends!
|
|
|
41
41
|
* actionIcon: xicon multiplayer
|
|
42
42
|
* imageUrl: /static/multiplayer/tag.png
|
|
43
43
|
* largeImageUrl: /static/multiplayer/tag.gif
|
|
44
|
-
* url:
|
|
44
|
+
* url: /--multiplayer?host=_cvxPm1WesYyi
|
|
45
45
|
* cardType: link
|
|
46
|
-
* otherAction:
|
|
46
|
+
* otherAction: /_cvxPm1WesYyi, , sharedExample
|
|
47
47
|
---
|
|
48
48
|
* name: Horse Race
|
|
49
49
|
* description: Up to 4 players race their horse to the finish line.
|
|
@@ -51,9 +51,9 @@ Try these multiplayer games with your friends!
|
|
|
51
51
|
* actionIcon: xicon multiplayer
|
|
52
52
|
* imageUrl: /static/multiplayer/horse-race.png
|
|
53
53
|
* largeImageUrl: /static/multiplayer/horse-race.gif
|
|
54
|
-
* url:
|
|
54
|
+
* url: /--multiplayer?host=_1DogpPTpb8fK
|
|
55
55
|
* cardType: link
|
|
56
|
-
* otherAction:
|
|
56
|
+
* otherAction: /_1DogpPTpb8fK, , sharedExample
|
|
57
57
|
---
|
|
58
58
|
* name: Painting Together
|
|
59
59
|
* description: Up to 4 people can paint together. Paint by holding down the A button and moving the arrow keys. Change the brush size by clicking the B button.
|
|
@@ -61,8 +61,8 @@ Try these multiplayer games with your friends!
|
|
|
61
61
|
* actionIcon: xicon multiplayer
|
|
62
62
|
* imageUrl: /static/multiplayer/painting.png
|
|
63
63
|
* largeImageUrl: /static/multiplayer/painting.gif
|
|
64
|
-
* url:
|
|
64
|
+
* url: /--multiplayer?host=_FdYfDwixRTAw
|
|
65
65
|
* cardType: link
|
|
66
|
-
* otherAction:
|
|
66
|
+
* otherAction: /_FdYfDwixRTAw, , sharedExample
|
|
67
67
|
|
|
68
68
|
### ~
|
package/docs/projects/SUMMARY.md
CHANGED
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
* [Maze](/tutorials/maze)
|
|
33
33
|
* [Side Scroller](/recipes/side-scroller/01-background)
|
|
34
34
|
* [Multiplayer Games](/multiplayer-games)
|
|
35
|
-
* [Perfect Fit](
|
|
36
|
-
* [Galga](
|
|
37
|
-
* [Arrow Battle](
|
|
38
|
-
* [Tag](
|
|
39
|
-
* [Horse Race](
|
|
40
|
-
* [Painting Together](
|
|
35
|
+
* [Perfect Fit](/--multiplayer?host=_bz3CCuWFiepH)
|
|
36
|
+
* [Galga](/--multiplayer?host=_C71PmfFaYDm2)
|
|
37
|
+
* [Arrow Battle](/--multiplayer?host=_dCP7f8c3q5PJ)
|
|
38
|
+
* [Tag](/--multiplayer?host=_cvxPm1WesYyi)
|
|
39
|
+
* [Horse Race](/--multiplayer?host=_1DogpPTpb8fK)
|
|
40
|
+
* [Painting Together](/--multiplayer?host=_FdYfDwixRTAw)
|
|
41
41
|
* [Live Coding](/live-coding)
|
|
42
42
|
* [Space Arcade Game](https://youtu.be/7pBGS_tKfmU)
|
|
43
43
|
* [Chase the Pizza](https://youtu.be/sgeHKw437oE)
|
|
@@ -17,7 +17,7 @@ scene.setBackgroundColor(8)
|
|
|
17
17
|
|
|
18
18
|
## {Draw your hero}
|
|
19
19
|
|
|
20
|
-
From ``||sprites:Sprites||``, drag the ``||variables:set mySprite to||`` block into ``||loops:on start|``. Click on the grey box in ``||variables:set mySprite to||`` and then select **Gallery** in the image editor. Choose your hero!
|
|
20
|
+
From ``||sprites:Sprites||``, drag the ``||variables(sprites):set mySprite to||`` block into ``||loops:on start|``. Click on the grey box in ``||variables(sprites):set mySprite to||`` and then select **Gallery** in the image editor. Choose your hero!
|
|
21
21
|
|
|
22
22
|
```blocks
|
|
23
23
|
scene.setBackgroundColor(8)
|
|
@@ -44,7 +44,7 @@ let mySprite = sprites.create(img`
|
|
|
44
44
|
|
|
45
45
|
## {Control your hero}
|
|
46
46
|
|
|
47
|
-
From ``||controller:Controller||``, drag the ``||controller:move mySprite with buttons||`` block **after** ``||variables:set mySprite to||``. This will allow you to move your sprite around the screen. Try it out in the simulator using the arrow keys on your keyboard or by clicking the joystick.
|
|
47
|
+
From ``||controller:Controller||``, drag the ``||controller:move mySprite with buttons||`` block **after** ``||variables(sprites):set mySprite to||``. This will allow you to move your sprite around the screen. Try it out in the simulator using the arrow keys on your keyboard or by clicking the joystick.
|
|
48
48
|
|
|
49
49
|
```blocks
|
|
50
50
|
scene.setBackgroundColor(8)
|
|
@@ -82,7 +82,7 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
82
82
|
|
|
83
83
|
## {Draw your projectile}
|
|
84
84
|
|
|
85
|
-
From ``||sprites:Sprites||`` drag ``||variables:projectile from mySprite||`` into the ``||controller:on A button pressed||``. Set the ``||sprites:vy||`` value to `0`, then click on the grey square to open the image editor and draw your projectile. Try shooting the projectile in the simulator using your keyboard or click the **A** button.
|
|
85
|
+
From ``||sprites:Sprites||`` drag ``||variables(sprites):projectile from mySprite||`` into the ``||controller:on A button pressed||``. Set the ``||sprites:vy||`` value to `0`, then click on the grey square to open the image editor and draw your projectile. Try shooting the projectile in the simulator using your keyboard or click the **A** button.
|
|
86
86
|
|
|
87
87
|
```blocks
|
|
88
88
|
let mySprite: Sprite = null
|
|
@@ -20,7 +20,7 @@ sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
|
20
20
|
## {Step 2}
|
|
21
21
|
|
|
22
22
|
Inside the ``||sprites:on created||`` block, place a ``||sprites:set velocity||`` block.
|
|
23
|
-
Drag the ``||variables:sprite||`` variable from the ``||sprites:on created||`` block and use it as the sprite inside of ``||sprites:set velocity||``.
|
|
23
|
+
Drag the ``||variables(noclick):sprite||`` variable from the ``||sprites:on created||`` block and use it as the sprite inside of ``||sprites:set velocity||``.
|
|
24
24
|
|
|
25
25
|
```blocks
|
|
26
26
|
sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
@@ -42,7 +42,7 @@ sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
|
42
42
|
## {Step 4}
|
|
43
43
|
|
|
44
44
|
Place a ``||sprites:set auto destroy||`` block below the ``||sprites:set velocity||`` block (this is called a sprite **flag**).
|
|
45
|
-
Just like before, drag the ``||variables:sprite||`` variable from the ``||sprites:on created||`` block and use it as the sprite for ``||sprites:set auto destroy||``.
|
|
45
|
+
Just like before, drag the ``||variables(noclick):sprite||`` variable from the ``||sprites:on created||`` block and use it as the sprite for ``||sprites:set auto destroy||``.
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
```blocks
|
|
@@ -17,8 +17,8 @@ game.onUpdateInterval(500, function () {
|
|
|
17
17
|
|
|
18
18
|
## {Step 2}
|
|
19
19
|
|
|
20
|
-
Inside the ``||game:on game update every||`` event, place a ``||variables:set mySprite to||`` ``||sprites:sprite||`` block.
|
|
21
|
-
Rename the variable to ``||variables:enemySprite||`` and change the ``||sprites:Player||`` kind to ``||sprites:Enemy||``. Click on the
|
|
20
|
+
Inside the ``||game:on game update every||`` event, place a ``||variables(sprites):set mySprite to||`` ``||sprites:sprite||`` block.
|
|
21
|
+
Rename the variable to ``||variables(noclick):enemySprite||`` and change the ``||sprites:Player||`` kind to ``||sprites:Enemy||``. Click on the
|
|
22
22
|
grey square to open the sprite editor and draw an image for the enemy.
|
|
23
23
|
|
|
24
24
|
```blocks
|
|
@@ -48,8 +48,8 @@ game.onUpdateInterval(500, function () {
|
|
|
48
48
|
|
|
49
49
|
## {Step 3}
|
|
50
50
|
|
|
51
|
-
Place a ``||sprites:set position to||`` block right below the ``||variables:set enemySprite to||`` ``||sprites:sprite||`` block. Change
|
|
52
|
-
the variable to ``||variables:enemySprite||`` in the dropdown list.
|
|
51
|
+
Place a ``||sprites:set position to||`` block right below the ``||variables(sprites):set enemySprite to||`` ``||sprites:sprite||`` block. Change
|
|
52
|
+
the variable to ``||variables(noclick):enemySprite||`` in the dropdown list.
|
|
53
53
|
|
|
54
54
|
```blocks
|
|
55
55
|
let enemySprite: Sprite = null
|
|
@@ -174,7 +174,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSp
|
|
|
174
174
|
## {Step 7}
|
|
175
175
|
|
|
176
176
|
Inside the ``||sprites:on overlaps||`` block, place a ``||sprites:destroy sprite||`` block. Drag the
|
|
177
|
-
``||variables:otherSprite||`` variable from the ``||sprites:on overlaps||`` block and place it inside
|
|
177
|
+
``||variables(noclick):otherSprite||`` variable from the ``||sprites:on overlaps||`` block and place it inside
|
|
178
178
|
the ``||sprites:destroy sprite||``.
|
|
179
179
|
|
|
180
180
|
|