-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
35 lines (35 loc) · 15 KB
/
main.blocks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable type="KIND_SpriteKind" id=")-x$N=}+qvR{oVj!ogl5">Player</variable><variable type="KIND_SpriteKind" id="sTBwZ)`(mA}6)twGWnp6">Projectile</variable><variable type="KIND_SpriteKind" id="MOnU#@?H-RBjR#:St5A0">Food</variable><variable type="KIND_SpriteKind" id="7/_;+)ANFBXwz=sn1/Un">Enemy</variable><variable id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</variable><variable id="uPk_Mc?U4$x.;PnXleUh">value</variable><variable id="eibZ9?)(0ZziCw~FY_8{">currentLevel</variable><variable id="Sk(Jo4d,k|}{-yx1Q[Kl">value2</variable><variable id="PEg^jau?PE|-@ZU_cqe]">newEnemy</variable><variable id="%uvaQKKE^I`J#:Qnt,=T">mySprite</variable></variables><block type="pxt-on-start" id="HM2@AHTOIr^`9?Z8fCrQ" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="y8!!m!?~QZqlne}l2~^t"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id=":wGQc,Kf]?0`g;=hf6sA"><value name="img"><shadow type="screen_image_picker" id="_bH0}*%Zzc]N:tD_7z%J"><field name="img">img`
. . . . . . . . . . . . . . . .
. . . . . f f f f f f . . . . .
. . . f f e e e e f 2 f . . . .
. . f f e e e e f 2 2 2 f . . .
. . f e e e f f e e e e f . . .
. . f f f f e e 2 2 2 2 e f . .
. . f e 2 2 2 f f f f e 2 f . .
. f f f f f f f e e e f f f . .
. f f e 4 4 e b f 4 4 e e f . .
. f e e 4 d 4 1 f d d e f . . .
. . f e e e e e d d d f . . . .
. . . . f 4 d d e 4 e f . . . .
. . . . f e d d e 2 2 f . . . .
. . . f f f e e f 5 5 f f . . .
. . . f f f f f f f f f f . . .
. . . . f f . . . f f f . . . .
`</field></shadow></value><value name="kind"><shadow type="spritekind" id="L(#:F[)YufgsC|o]yLR+"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="game_control_sprite" id="[ZBM]Ei%Qe]D.PLlP?%$"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><value name="sprite"><shadow type="variables_get" id="j4f.z]*^(gW^61gj$8l2"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field></shadow></value><value name="vx"><shadow type="math_number" id="U*Eq{HSf9k61o:AIaiRE"><field name="NUM">150</field></shadow></value><value name="vy"><shadow type="math_number" id="uub`Rfl/+3D1j#I|bo)w"><field name="NUM">0</field></shadow></value><next><block type="Sprite_blockCombine_set" id="D3t`5WBQq;dGC+3zHZ:$"><field name="property">Sprite.ay@set</field><value name="mySprite"><block type="variables_get" id="*~}eXAP9CKBQMwjBPT1N"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field></block></value><value name="value"><shadow type="math_number" id="t(jAP(u}MU1R_#|_aJpX"><field name="NUM">500</field></shadow></value><next><block type="camerafollow" id="1fLEWg]M3%#(,s#?|[sC"><value name="sprite"><shadow type="variables_get" id="i*O{Vk?x*q]F`KSW2jzb"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field></shadow></value><next><block type="hudSetLife" id="iYzBOqPer;L73-qAn8]Q"><value name="value"><shadow type="math_number" id="`:h4W~N2dl=CYthAQ[gd"><field name="NUM">3</field></shadow></value><next><block type="function_call" id=";@J/uJc2kfo`(g0@B9A$"><mutation name="startNextLevel" functionid="QJN-Q7:N21acRJUK)gnR"/></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="spriteshittile" id="2c-l~J4eWu;=8dvQlQFF" x="643" y="0"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="qP*.n.pb4;CU3T*`A|vx"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="XB,W[YbHXCw3zD$Z!wAx"><field name="MEMBER">Player</field></shadow></value><value name="tile"><shadow type="tileset_tile_picker" id="GuQM%iuozB@ip3ujP(c`"><field name="tile">myTiles.tile2</field></shadow></value><value name="HANDLER_DRAG_PARAM_location"><shadow type="argument_reporter_custom" id="42C!]7/[3s1U%:GaKWj_"><mutation typename="tiles.Location"/><field name="VALUE">location</field></shadow></value><statement name="HANDLER"><block type="gameOver" id="eE|5pMNRj;@pv1=@y+[("><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="win"><shadow type="toggleWinLose" id="3nng@d?PT`j=QQu_MpYx"><field name="win">false</field></shadow></value></block></statement></block><block type="spriteshittile" id="uoVV:ULZOqMx.X:H@c@]" x="1271" y="0"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="CsOZwWjeg-^+;wvuGJNi"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="Xx.NW8Pgn-oW)ae95H0W"><field name="MEMBER">Player</field></shadow></value><value name="tile"><shadow type="tileset_tile_picker" id=";.X{N39Q=PH20B.`n{1g"><field name="tile">myTiles.tile4</field></shadow></value><value name="HANDLER_DRAG_PARAM_location"><shadow type="argument_reporter_custom" id="V{~7/tjWcF3f8{:0gL5/"><mutation typename="tiles.Location"/><field name="VALUE">location</field></shadow></value><statement name="HANDLER"><block type="function_call" id="-CTBS0|4bpZ.:#59g^jl"><mutation name="startNextLevel" functionid="QJN-Q7:N21acRJUK)gnR"/></block></statement></block><block type="keyonevent" id="[0WB)1nyRG9#5Vad;CRM" x="1899" y="0"><field name="button">controller.A</field><field name="event">ControllerButtonEvent.Pressed</field><statement name="HANDLER"><block type="Sprite_blockCombine_set" id="718!ofBJDcX{*45baPjO"><field name="property">Sprite.vy@set</field><value name="mySprite"><block type="variables_get" id="z@}bE-KKb7]l`qGPWmJ4"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field></block></value><value name="value"><shadow type="math_number" id="}fsLZ?gXqjoIOzQJb;-x"><field name="NUM">-200</field></shadow></value></block></statement></block><block type="function_definition" id="H`m##7jb//B/Vlc?LB@W" x="0" y="431"><mutation name="startNextLevel" functionid="QJN-Q7:N21acRJUK)gnR"/><field name="function_name">startNextLevel</field><statement name="STACK"><block type="pxt_controls_for_of" id="+cni58AZ13[W;)q[Q-|}"><value name="VAR"><shadow type="variables_get_reporter" id="wgkmAju~ipb8~eK,-h!X"><field name="VAR" id="uPk_Mc?U4$x.;PnXleUh">value</field></shadow></value><value name="LIST"><block type="allOfKind" id="59`T{U0CJ?[2Ib`8.4[="><value name="kind"><shadow type="spritekind" id="K}%t;`cIxP=#|B46a=|*"><field name="MEMBER">Enemy</field></shadow></value></block></value><statement name="DO"><block type="spritedestroy" id="78:/])TuS9P}!8%K6s1l"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><field name="effect">effects.hearts</field><value name="sprite"><block type="variables_get" id="_nht/#oX!.n*)2S5I-Xy"><field name="VAR" id="uPk_Mc?U4$x.;PnXleUh">value</field></block></value><value name="duration"><shadow type="timePicker" id="@5%e=9%5$DT0L4g{X{L7"><field name="ms">200</field></shadow></value></block></statement><next><block type="controls_if" id="rF:UlIPU`G2JC#D9+TtW"><mutation elseif="2" else="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="95Qp,ec{vPi=ktj/1;LZ"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="%#z/_h0Rb?KNSg|EDYt5"><field name="VAR" id="eibZ9?)(0ZziCw~FY_8{">currentLevel</field></block></value><value name="B"><shadow type="math_number" id="Z(o9;qtQO`/|JhsP![2L"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="tilemap_editor" id="Lxk4^ftA7@@8M^tH._A`"><field name="tilemap">tilemap`level_0`</field></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="0)2)4R.vkgDt.!)mpg$s"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="A*VbCa=_-f3oQZ~]7#YM"><field name="VAR" id="eibZ9?)(0ZziCw~FY_8{">currentLevel</field></block></value><value name="B"><shadow type="math_number" id="S;{)a03o#~y3GszKYuV2"><field name="NUM">1</field></shadow></value></block></value><statement name="DO1"><block type="tilemap_editor" id=".!j{.v+*)t$Pl4+NgFiU"><field name="tilemap">tilemap`level_1`</field></block></statement><value name="IF2"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="4qat0d{vA(p7N[QJ}nAg"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="+x3)v.Z%N(ruxB_jI03;"><field name="VAR" id="eibZ9?)(0ZziCw~FY_8{">currentLevel</field></block></value><value name="B"><shadow type="math_number" id="pFL#GF-}|e:aIpNn4=wX"><field name="NUM">2</field></shadow></value></block></value><statement name="DO2"><block type="tilemap_editor" id="jUA((*UDqyuq`]?S|A.3"><field name="tilemap">tilemap`level_2`</field></block></statement><statement name="ELSE"><block type="gameOver" id="+F=6+VUeNC5fUbgk67oO"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="win"><shadow type="toggleWinLose" id="tsX)C;b5XW/Wl%^x.2%]"><field name="win">true</field></shadow></value></block></statement><next><block type="mapplaceonrandomtile" id="la-sISYZFx~QFCerF{=8"><value name="sprite"><shadow type="variables_get" id="1o2KH{n1qqa$g}k82Dy7"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field></shadow></value><value name="tile"><shadow type="tileset_tile_picker" id="aL.c`Un`5;O4@G*x@E=z"><field name="tile">myTiles.tile3</field></shadow></value><next><block type="pxt_controls_for_of" id="~.uX(cd}bYjnIYCexx9E"><value name="VAR"><shadow type="variables_get_reporter" id=",3fes@HjHQ4#FrF!Dd=}"><field name="VAR" id="Sk(Jo4d,k|}{-yx1Q[Kl">value2</field></shadow></value><value name="LIST"><block type="mapgettilestype" id="p697ww?Sr8^,5~M0If%1"><value name="tile"><shadow type="tileset_tile_picker" id="#.5%jdE/tG8,4-)9Qy=4"><field name="tile">myTiles.tile5</field></shadow></value></block></value><statement name="DO"><block type="variables_set" id="HHpueZa7P)L_$I46`o[M"><field name="VAR" id="PEg^jau?PE|-@ZU_cqe]">newEnemy</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="43ciTF%eBp]?r=lTp?8]"><value name="img"><shadow type="screen_image_picker" id="a1n}+[S^Scw@Cgm@qqBe"><field name="img">img`
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . c c . c c . . . . . . . .
. . f 3 c c 3 c c c . . . . . .
. f c 3 b c 3 b c c c . . . . .
f c b b b b b b b b f f . . . .
c c 1 b b b 1 b b b f f . . . .
c b b b b b b b b c f f f . . .
c b 1 f f 1 c b b f f f f . . .
f f 1 f f 1 f b c c b b b . . .
f f f f f f f b f c c c c . . .
f f 2 2 2 2 f b f b b c c c . .
. f 2 2 2 2 2 b c c b b c . . .
. . f 2 2 2 b f f c c b b c . .
. . . f f f f f f f c c c c c .
. . . . . . . . . . . . c c c c
`</field></shadow></value><value name="kind"><shadow type="spritekind" id="c~B_xq[-0c}}NotGHc$^"><field name="MEMBER">Enemy</field></shadow></value></block></value><next><block type="mapplaceontile" id="QY$fW~$]sR+Lq3GNc[N|"><value name="sprite"><shadow type="variables_get" id="?fYMIig?MR}E#)M`hzb^"><field name="VAR" id="PEg^jau?PE|-@ZU_cqe]">newEnemy</field></shadow></value><value name="loc"><shadow type="mapgettile"/><block type="variables_get" id="waq#I]w8O{t()_()(!jW"><field name="VAR" id="Sk(Jo4d,k|}{-yx1Q[Kl">value2</field></block></value><next><block type="spriteFollowOtherSprite" id="H+x{c2,d5}zupY(SZ?yl"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="1" _input_init="true"></mutation><value name="sprite"><block type="variables_get" id="}fWF:bVJH.;Ha8P2.AWx"><field name="VAR" id="PEg^jau?PE|-@ZU_cqe]">newEnemy</field></block></value><value name="target"><shadow type="variables_get" id="Bn3}!a-11nNIt7*Bn|Z{"><field name="VAR" id=")}Qmy;w@.LGO?Edi%[5/">newPlayer</field></shadow></value><value name="speed"><shadow type="math_number" id="^M!x_7=-?y@VAr2/oLus"><field name="NUM">20</field></shadow></value></block></next></block></next></block></statement><next><block type="variables_change" id="y:4o^Jst[1Znxfnm+oYq"><field name="VAR" id="eibZ9?)(0ZziCw~FY_8{">currentLevel</field><value name="VALUE"><shadow type="math_number" id="7M@]Pgh51L;3ZlF@Fd_;"><field name="NUM">1</field></shadow></value></block></next></block></next></block></next></block></next></block></statement></block><block type="spritesoverlap" id="u?PWvd7I0zcKanSoDrjy" x="901" y="431"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="E3{!6H2%r.E.~65Z9b#V"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="06@wiMC,N6]UVR%B4!$n"><field name="MEMBER">Player</field></shadow></value><value name="HANDLER_DRAG_PARAM_otherSprite"><shadow type="argument_reporter_custom" id="Qn822xd``0%/.Ju./GS["><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></shadow></value><value name="otherKind"><shadow type="spritekind" id="+o*v/Y{s;WNO(D1:6vBd"><field name="MEMBER">Enemy</field></shadow></value><statement name="HANDLER"><block type="spritedestroy" id="NYSJs!=b8o}F{PypJUOB"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="argument_reporter_custom" id="n~Zs!i}wb6I@gJb8XxSV"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></block></value><next><block type="controls_if" id="/kv?SJ7~DKzpAvvX4+V6"><mutation else="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="vh7Yk.^D)rxWKh[_XfL?"><field name="OP">LT</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="Sprite_blockCombine_get" id="EEJN|lOd.qvF.orXsQ~O"><field name="property">Sprite.bottom</field><value name="mySprite"><block type="argument_reporter_custom" id="gceqJJ2Dv7_*lxfRO?pA"><mutation typename="Sprite"/><field name="VALUE">sprite</field></block></value></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="Sprite_blockCombine_get" id="JA*Lm$i4oF(|BhV5rVK|"><field name="property">Sprite.y</field><value name="mySprite"><block type="argument_reporter_custom" id="|snJGN)xD:!BeZcLs7oo"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></block></value></block></value></block></value><statement name="DO0"><block type="Sprite_blockCombine_set" id="5(mqGuwCYLFp,=lhx[yF"><field name="property">Sprite.vy@set</field><value name="mySprite"><block type="argument_reporter_custom" id="(t{7=NT1~?[-j]^MJ=0e"><mutation typename="Sprite"/><field name="VALUE">sprite</field></block></value><value name="value"><shadow type="math_number" id="RkFl1t8%eu[o%Z#[2v{s"><field name="NUM">-100</field></shadow></value></block></statement><statement name="ELSE"><block type="hudChangeLifeBy" id="~?oKcJSNUmQ|^`xC$Gt5"><value name="value"><shadow type="math_number" id="fk0N`3#J^N#z5%5YQD!k"><field name="NUM">-1</field></shadow></value></block></statement></block></next></block></statement></block></xml>