Skip to content

Commit 6d6172c

Browse files
line block changes tested
1 parent 979675c commit 6d6172c

6 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/makecode/blocks.png

-10.5 KB
Loading

.github/makecode/blocksdiff.png

-11.6 KB
Loading

main.blocks

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable type="KIND_SpriteKind" id="DvQ7!.P`YK8ar6!B^s1e">Player</variable><variable type="KIND_SpriteKind" id="MI7V!9LKh@~p9Z@ZfV4P">Projectile</variable><variable type="KIND_SpriteKind" id="$y54-as=Gm|COtlX@2op">Food</variable><variable type="KIND_SpriteKind" id="GSTCDw;pc$2:I:_SgZpn">Enemy</variable><variable id="XmZ?|I8uFqea?GG=mAQr">mySprite</variable><variable id="5;`sD*6[T$8SjI)Lq|iu">value</variable></variables><block type="pxt-on-start" id="E6#Su4fv*:9Cqs*ag([F" x="0" y="0"><statement name="HANDLER"><block type="set_current_tilemap" id="z)(%pNAEC75!BoTTCS*G"><value name="tilemap"><shadow type="tiles_tilemap_editor"></shadow><block type="maze_generateTilemap" id="db#N!Ie@B7ilgqc@v}(="><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><field name="algorithm">MazeAlgorithm.Ellers</field><value name="mazeWidth"><shadow type="math_number" id="3?MnsV}J;#YHzD+DRb2p"><field name="NUM">8</field></shadow></value><value name="mazeHeight"><shadow type="math_number" id="uky:Up/RAD6TZ.,XWkKk"><field name="NUM">8</field></shadow></value><value name="wall"><shadow type="tileset_tile_picker" id="#g_Fr#cys(EK4NRJ?0yM"><field name="tile">sprites.dungeon.floorDark0</field></shadow></value><value name="floor"><shadow type="tileset_tile_picker" id="CB8qCGhnC9zRYZ`i$:aj"><field name="tile">sprites.castle.tileGrass2</field></shadow></value><value name="corridorSize"><shadow type="math_number" id="nPN?{$1Y!D-E508`-5yL"><field name="NUM">2</field></shadow></value><value name="seed"><shadow type="math_number" id="cRYR1~SeOlDmBW-a7Va^"><field name="NUM">0</field></shadow></value></block></value><next><block type="variables_set" id="(D~,{LM=t.jB/.U6:u0!"><field name="VAR" id="XmZ?|I8uFqea?GG=mAQr">mySprite</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="l1Z,kv;;z*@Z5==qXoOh"><value name="img"><shadow type="screen_image_picker" id="GYm.JnaZRX0QL5G(s0!O"><field name="img">img`
1+
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable type="KIND_SpriteKind" id="Bzp.IrZSvxERt]VBablf">Player</variable><variable type="KIND_SpriteKind" id="$f;Iz=*fs18hS;#%cP6,">Projectile</variable><variable type="KIND_SpriteKind" id="SH}z~2AgC$xzF/0a_g-(">Food</variable><variable type="KIND_SpriteKind" id="KS8VGinqleuA1z#G@Rf2">Enemy</variable><variable id="+9!h{iAQYJH4)|o[B/ix">mySprite</variable><variable id="),=QH@Dn:@mHvp{j|jfY">value</variable><variable id="$9gizyN$XU=JpL@{%y,#">index</variable><variable id="T,.ukA!{HbpSRCHi2F(F">list</variable></variables><block type="pxt-on-start" id="2#LgQ:T|Djz0C5nic-Df" x="0" y="0"><statement name="HANDLER"><block type="set_current_tilemap" id="21$[]QKAtTk5~)WCGguP"><value name="tilemap"><shadow type="tiles_tilemap_editor"></shadow><block type="maze_generateTilemap" id="OT2|qD,}aY,erHc.`)hy"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><field name="algorithm">MazeAlgorithm.Ellers</field><value name="mazeWidth"><shadow type="math_number" id="$iX5_v?d=zc,+eAZZr[/"><field name="NUM">8</field></shadow></value><value name="mazeHeight"><shadow type="math_number" id="[dpc.Aq{[%4(M+~:AW-w"><field name="NUM">8</field></shadow></value><value name="wall"><shadow type="tileset_tile_picker" id="q5tZfeP/6emBreeeY0JZ"><field name="tile">sprites.dungeon.floorDark0</field></shadow></value><value name="floor"><shadow type="tileset_tile_picker" id="s%,wf*vfZ8[[AsN,D-lH"><field name="tile">sprites.castle.tileGrass2</field></shadow></value><value name="corridorSize"><shadow type="math_number" id="m*Y5;riiO%mKO4_{gTLg"><field name="NUM">2</field></shadow></value><value name="seed"><shadow type="math_number" id="l^nL0?V2a]HM89$e[y[m"><field name="NUM">0</field></shadow></value></block></value><next><block type="variables_set" id="mOov{br+$[ltFE81#)p0"><field name="VAR" id="+9!h{iAQYJH4)|o[B/ix">mySprite</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="8%`.@*2cVhgtBxSyp+r/"><value name="img"><shadow type="screen_image_picker" id="O5K9Lgj!^;aY5{fHEifa"><field name="img">img`
22
........................
33
.....ffff...............
44
...fff22fff.............
@@ -23,4 +23,4 @@ fbbbbf2222fd4...........
2323
........................
2424
........................
2525
........................
26-
`</field><data>{"commentRefs":[],"fieldData":{"img":null}}</data></shadow></value><value name="kind"><shadow type="spritekind" id="Iou|A`Vo1j)NWkg380_*"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="mapplaceontile" id="Kj+f+]H]J;Qg#;XlCk])"><value name="sprite"><shadow type="variables_get" id="kJdF%w,!#Vb~OsmdBI4N"><field name="VAR" id="XmZ?|I8uFqea?GG=mAQr">mySprite</field></shadow></value><value name="loc"><shadow type="mapgettile" id="HpghHe0_,r%?TbnbA2i{"><value name="col"><shadow type="math_number" id="TQ~6R7y4*1G.Qn?))jWT"><field name="NUM">2</field></shadow></value><value name="row"><shadow type="math_number" id="[(5xC/d[yO}O!Fcojt0W"><field name="NUM">2</field></shadow></value></shadow></value><next><block type="game_control_sprite" id=".Oy3Z3U+aKz5JHeYc(:/"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><value name="sprite"><shadow type="variables_get" id="k@Xo?$K~//EZwy3ZM*oi"><field name="VAR" id="XmZ?|I8uFqea?GG=mAQr">mySprite</field></shadow></value><next><block type="camerafollow" id="=d*)mC~V.RV_y#yOb14T"><value name="sprite"><shadow type="variables_get" id="[_t-V[:j6TEVzHGLXKgv"><field name="VAR" id="XmZ?|I8uFqea?GG=mAQr">mySprite</field></shadow></value><next><block type="pxt_controls_for_of" id="ARXn2B_D(xDFWIBUHz*}"><value name="VAR"><shadow type="variables_get_reporter" id="@_e$$(IR)M?gXj;fn|e%"><field name="VAR" id="5;`sD*6[T$8SjI)Lq|iu">value</field></shadow></value><value name="LIST"><block type="tilesExt_getRandomTilesByType" id="390DvuoW9}?Osc!UZ9XY"><value name="maxCount"><shadow type="math_number" id="/(z)0927WGK/?S36zA|c"><field name="NUM">10</field></shadow></value><value name="tile"><shadow type="tileset_tile_picker" id="chGhBHeraD?3shW:iPfn"><field name="tile">sprites.castle.tileGrass2</field></shadow></value></block></value><statement name="DO"><block type="mapsettileat" id="=6.,0RUVRmVKE68*8xMb"><value name="tile"><shadow type="tileset_tile_picker" id="yeYYT1CY1aB858)2=k@$"><field name="tile">sprites.dungeon.chestClosed</field></shadow></value><value name="loc"><shadow type="mapgettile"></shadow><block type="variables_get" id="Ox^wUgI@(l-$MpV~wp$R"><field name="VAR" id="5;`sD*6[T$8SjI)Lq|iu">value</field></block></value></block></statement><next><block type="tilesExt_line_statement" id="X3NzW:TzMo9rv.Y+Tr[~"><field name="lineType">LineType.Diagonal</field><value name="HANDLER_DRAG_PARAM_loc"><shadow type="argument_reporter_custom" id="82y=PlvT4?`Bb]fGFq{g"><mutation typename="tiles.Location"></mutation><field name="VALUE">loc</field></shadow></value><value name="l1"><shadow type="mapgettile" id="_@ZTDgE[zo6#y{uO}%Ux"><value name="col"><shadow type="math_number" id="LvP-9.PLJxMrQhXa/F`u"><field name="NUM">0</field></shadow></value><value name="row"><shadow type="math_number" id="a^UX7uzK{Sd5bdjt;~,f"><field name="NUM">0</field></shadow></value></shadow></value><value name="l2"><shadow type="mapgettile" id="b/^egZo{WH#!?pffIA3="><value name="col"><shadow type="math_number" id="$s,fX)K)rsSQ~JQ{?(hP"><field name="NUM">5</field></shadow></value><value name="row"><shadow type="math_number" id="dE[9xPpwxcjPA`S8P.D:"><field name="NUM">5</field></shadow></value></shadow></value><value name="exclusive"><shadow type="logic_boolean" id="bte)q.[!/#hB6)GT.$QO"><field name="BOOL">TRUE</field></shadow></value><statement name="HANDLER"><block type="mapsettileat" id="QEdhC/]i91%5S+_t;kX_"><value name="tile"><shadow type="tileset_tile_picker" id="{qc@(go8C7J3qi8p]=f!"><field name="tile">sprites.builtin.brick</field></shadow></value><value name="loc"><shadow type="mapgettile"></shadow><block type="argument_reporter_custom" id="~qt1l~HH$#?5O,8luKRv"><mutation typename="tiles.Location"></mutation><field name="VALUE">loc</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="forever" id="mUn[9@g{%U1ho.Y#M.sW" x="120" y="720"><statement name="HANDLER"><block type="controls_if" id="H5a?dF}$LRyBu$quJwZ!"><value name="IF0"><shadow type="logic_boolean" id="jrLmm`SdNQ#WE)0XBr89"><field name="BOOL">TRUE</field></shadow></value></block></statement></block></xml>
26+
`</field><data>{"commentRefs":[],"fieldData":{"img":"O5K9Lgj!^;aY5{fHEifa"}}</data></shadow></value><value name="kind"><shadow type="spritekind" id="s3fDKdK~%~)p`WKNzB!$"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="mapplaceontile" id="0~YmwAemqj}O[QJKmg1X"><value name="sprite"><shadow type="variables_get" id="e|llBI4@@)1#(K4-lf|]"><field name="VAR" id="+9!h{iAQYJH4)|o[B/ix">mySprite</field></shadow></value><value name="loc"><shadow type="mapgettile" id="ad4]KCyfY[KT]rMsMG44"><value name="col"><shadow type="math_number" id="5l;7M~{E{/!M#M]x#U#T"><field name="NUM">2</field></shadow></value><value name="row"><shadow type="math_number" id="){9**c8{_Ef*~$@SGvOw"><field name="NUM">2</field></shadow></value></shadow></value><next><block type="game_control_sprite" id="g`gij(W-7rkMVJ;wCYuF"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><value name="sprite"><shadow type="variables_get" id="L{.?sN!B0{]fcWR#vF.Z"><field name="VAR" id="+9!h{iAQYJH4)|o[B/ix">mySprite</field></shadow></value><next><block type="camerafollow" id="96WRu7=Lfk3^4O5v|-i%"><value name="sprite"><shadow type="variables_get" id="1m!C;riN.@!y$7aEkE01"><field name="VAR" id="+9!h{iAQYJH4)|o[B/ix">mySprite</field></shadow></value><next><block type="pxt_controls_for_of" id="A,%C$*GnW+cn=:B5J:%J"><value name="VAR"><shadow type="variables_get_reporter" id="d,1}3)2^Sl^)A{E5`5Ag"><field name="VAR" id="),=QH@Dn:@mHvp{j|jfY">value</field></shadow></value><value name="LIST"><block type="tilesExt_getRandomTilesByType" id=",G.Et$;^ZjSU4Gzvmwqv"><value name="maxCount"><shadow type="math_number" id="ds`}pPv,kvy?L0bmc?I+"><field name="NUM">10</field></shadow></value><value name="tile"><shadow type="tileset_tile_picker" id="W47QS:w+mN8=stcmn9Uk"><field name="tile">sprites.castle.tileGrass2</field></shadow></value></block></value><statement name="DO"><block type="mapsettileat" id="8Q7K{)J2r4Q(_Dy|Mow@"><value name="tile"><shadow type="tileset_tile_picker" id="DZo=*(l?jSUZ7sHOEZe;"><field name="tile">sprites.dungeon.chestClosed</field></shadow></value><value name="loc"><shadow type="mapgettile"></shadow><block type="variables_get" id="HAvtQ=[rQuTeyg8IM70$"><field name="VAR" id="),=QH@Dn:@mHvp{j|jfY">value</field></block></value></block></statement><next><block type="pxt_controls_for_of" id="571kk3,5b^iHbxbvM7K4"><value name="VAR"><shadow type="variables_get_reporter" id="sJzEu|0(cBJGf6+~!h%w"><field name="VAR" id="),=QH@Dn:@mHvp{j|jfY">value</field></shadow></value><value name="LIST"><shadow type="variables_get" id="G?J6JEuRDlpqiEsZc7Fy"><field name="VAR" id="T,.ukA!{HbpSRCHi2F(F">list</field></shadow><block type="tilesExt_line" id="iceUsf%5h2LvW}lc0wZc"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><field name="lineType">LineType.Covering</field><value name="l1"><shadow type="mapgettile" id="yxez+9UoNvmq7iSST)bv"><value name="col"><shadow type="math_number" id=")$djDrUW][3D~LaV2!{7"><field name="NUM">0</field></shadow></value><value name="row"><shadow type="math_number" id=",{7gQ~9+Jp+3Vy96:CoK"><field name="NUM">0</field></shadow></value></shadow></value><value name="l2"><shadow type="mapgettile" id="|tW/-f{Qf,Z42;kP~:%t"><value name="col"><shadow type="math_number" id="z/z`jlS][XN_7;l9$0+z"><field name="NUM">5</field></shadow></value><value name="row"><shadow type="math_number" id="w0*(lB)_t,ApNMEnQ@6G"><field name="NUM">5</field></shadow></value></shadow></value><value name="exclusive"><shadow type="logic_boolean" id="dfHq6LpYg^k59?xt_|P9"><field name="BOOL">FALSE</field></shadow></value></block></value><statement name="DO"><block type="mapsettileat" id="wj(d|.|ai^~fs|3poKOU"><value name="tile"><shadow type="tileset_tile_picker" id="M:mI3!xWs`U~r[CV+)9m"><field name="tile">sprites.builtin.brick</field></shadow></value><value name="loc"><shadow type="mapgettile" id="6kE67=)e-U?6jsiI[`1?"><value name="col"><shadow type="math_number" id="*t4.x2,?vl=lZ-cP*mO("><field name="NUM">0</field></shadow></value><value name="row"><shadow type="math_number" id="QlaIws8EUS=!]8Xb$?[#"><field name="NUM">0</field></shadow></value></shadow><block type="variables_get" id="{3%J1oU,jexKgCZ7SfPB"><field name="VAR" id="),=QH@Dn:@mHvp{j|jfY">value</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml>

main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ scene.cameraFollowSprite(mySprite)
3131
for (let value of tilesExt.getRandomTilesByType(sprites.castle.tileGrass2, 10)) {
3232
tiles.setTileAt(value, sprites.dungeon.chestClosed)
3333
}
34+
for (let value of tilesExt.line(LineType.Covering, tiles.getTileLocation(0, 0), tiles.getTileLocation(5, 5))) {
35+
tiles.setTileAt(value, sprites.builtin.brick)
36+
}

pxt.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"supportedTargets": [
2929
"arcade"
3030
],
31-
"preferredEditor": "tsprj"
31+
"preferredEditor": "blocksprj"
3232
}

tilemapExt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace tilesExt {
2121
//% inlineInputMode=inline
2222
//% l1.shadow=mapgettile
2323
//% l2.shadow=mapgettile
24-
export function line(lineType: LineType, l1: TL, l2: TL, exclusive: boolean): TL[] {
24+
export function line(lineType: LineType, l1: TL, l2: TL, exclusive?: boolean): TL[] {
2525
return lineType === LineType.Diagonal ? diagonalLine(l1,l2,exclusive) :
2626
lineType === LineType.Covering ? coveringLine(l1,l2,exclusive) :
2727
undefined;

0 commit comments

Comments
 (0)