-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
1 lines (1 loc) · 17.9 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="J]W#.J}jw%i#HD#JnJnI">GAME_RUNNING</variable><variable id="+W59bc@:eRYQ0J763oOc">SPACE_SHIP</variable><variable id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</variable><variable id="=^gE[9yTrN=(oKWjDQaE">sprite</variable><variable id="8$J:~b4W:+uv.A(IDC1p">index</variable><variable id="T!UErrxJ*r|2zfos/1i|">SCORE</variable><variable id="jsJKm92AB=@s8x-~4m^{">SPEED</variable><variable id="?+[`a-_IWamv(*$:_(r=">COUNTDOWN</variable><variable id="C^9^|bU`lx0;+5{H{tCJ">PITCH</variable></variables><block type="input_logo_event" id="FdQkNL/hf-.-RZ=:|T.Z" x="0" y="0"><field name="action">TouchButtonEvent.Pressed</field><statement name="HANDLER"><block type="device_pause" id="qBjGV!uraT^*6*ga*W+]"><value name="pause"><shadow type="timePicker" id="`e@O3*O5;t|Sb#n`+S{H"><field name="ms">200</field></shadow></value><next><block type="variables_set" id="b6zcVF=gABzXdE?,IL,i"><field name="VAR" id="?+[`a-_IWamv(*$:_(r=">COUNTDOWN</field><value name="VALUE"><shadow type="math_number" id="nBol6_}h%o`Lm0L[Z`mr"><field name="NUM">5</field></shadow></value><next><block type="device_while" id="7%mFA,wNU6%+0fid7!aA"><value name="COND"><shadow type="logic_boolean"><field name="BOOL">FALSE</field></shadow><block type="logic_compare" id="V,K5zAD:xXH3*~M4}_z("><field name="OP">GTE</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="Kt8}~]{-xbEBJ]kbtyaB"><field name="VAR" id="?+[`a-_IWamv(*$:_(r=">COUNTDOWN</field></block></value><value name="B"><shadow type="math_number" id="r{LQf0WhRCd*nxwqv(xh"><field name="NUM">1</field></shadow></value></block></value><statement name="DO"><block type="device_play_note" id="Kdi7sjGfa5n6Kv!tGE;n"><value name="note"><shadow type="device_note" id="UyW9%YrDsIWS#T}afN6~"><field name="name">587</field></shadow></value><value name="duration"><shadow type="device_beat" id="z{86?/6{)HXMZ8$O^Ig?"><field name="fraction">BeatFraction.Eighth</field></shadow></value><next><block type="device_print_message" id="d4r0-14`a{d?sU0Saz/d"><value name="text"><shadow type="text"><field name="TEXT">Hello!</field></shadow><block type="variables_get" id=",RjT7!YL_.(7${-?ST5/"><field name="VAR" id="?+[`a-_IWamv(*$:_(r=">COUNTDOWN</field></block></value><next><block type="variables_change" id="1qk)kbLWdOEV~XQ{{F+n"><field name="VAR" id="?+[`a-_IWamv(*$:_(r=">COUNTDOWN</field><value name="VALUE"><shadow type="math_number" id="1@ZOAh6h)y7Wi.7pm0rw"><field name="NUM">-1</field></shadow></value></block></next></block></next></block></statement><next><block type="variables_set" id=":lQ64%V!=CLwv)pJigH`"><field name="VAR" id="J]W#.J}jw%i#HD#JnJnI">GAME_RUNNING</field><value name="VALUE"><shadow type="math_number" id="D7{gQZm8],q:*iq}zdQN"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="M0a|`*$`!z16mB;@p2TL"><field name="VAR" id="T!UErrxJ*r|2zfos/1i|">SCORE</field><value name="VALUE"><shadow type="math_number" id="4Fx{)o]KiVYikI^_E/Mg"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="St.j|kF(+8wa#df.((TU"><field name="VAR" id="+W59bc@:eRYQ0J763oOc">SPACE_SHIP</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="game_create_sprite" id="UpUF*TuQkv}7a.GSt[e)"><value name="x"><shadow type="math_number" id="Ihzp!Y5#7k.@mzCn[]3p"><field name="NUM">2</field></shadow></value><value name="y"><shadow type="math_number" id=":Vs0{;B@T_HcF_~B~L=+"><field name="NUM">4</field></shadow></value></block></value><next><block type="variables_set" id="u^6S-q4+Q`DM@A]1n_/7"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field><value name="VALUE"><shadow type="math_number" id="9_bTuZOCXJw.7y/8kKF,"><field name="NUM">500</field></shadow></value><next><block type="variables_set" id="H*jQNS;k9CgSwyUMC4sM"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field><value name="VALUE"><shadow type="math_number" id="+ArIi_{-VV;4s-}#544."><field name="NUM">600</field></shadow></value><next><block type="variables_set" id="AhuYbA,BC9ME%Pl3m-pb"><field name="VAR" id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="game_create_sprite" id="q5a%BuV/0xK%A!Q|_U0C"><value name="x"><shadow type="math_number"><field name="NUM">2</field></shadow><block type="device_random" id="W.cbpa/cusAsKQ9NBLS@"><value name="min"><shadow type="math_number" id="oRmzd(=^%UaQ@(Hu.sgQ"><field name="NUM">0</field></shadow></value><value name="limit"><shadow type="math_number" id="R8e4)d[Q5HqmZxqy}]Sr"><field name="NUM">4</field></shadow></value></block></value><value name="y"><shadow type="math_number" id="fYFfU8sd`4,~Z@SiU%(q"><field name="NUM">0</field></shadow></value></block></value><next><block type="device_while" id="~g}Vb;2F(-9kO)xWQ@9d"><value name="COND"><shadow type="logic_boolean"><field name="BOOL">FALSE</field></shadow><block type="logic_compare" id="%9#T$^_|u+v#K4R/Ho3-"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="~!2A1qS32eeN7/z@4mhc"><field name="VAR" id="J]W#.J}jw%i#HD#JnJnI">GAME_RUNNING</field></block></value><value name="B"><shadow type="math_number" id="Pqvtw4GR.y/.b#s?B#[2"><field name="NUM">1</field></shadow></value></block></value><statement name="DO"><block type="game_sprite_set_property" id="6M{]iWSzvCnwp4Z5QP`c"><field name="property">LedSpriteProperty.Y</field><value name="sprite"><block type="variables_get" id="(.nOJgDjV;37_+lWBt]}"><field name="VAR" id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</field></block></value><value name="value"><shadow type="math_number" id="gA/GX6a`D^q@8uKe$2I+"><field name="NUM">0</field></shadow></value><next><block type="game_sprite_set_property" id="2uH_`6[m__Xol6s,{~H7"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="rj7dS1`(!~+DiMwVt!Xj"><field name="VAR" id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</field></block></value><value name="value"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="device_random" id="@Yq4vSv2B:*|yTN-^9,#"><value name="min"><shadow type="math_number" id="3K{8FipMmyN$*N;9t.?_"><field name="NUM">0</field></shadow></value><value name="limit"><shadow type="math_number" id="^U04~KS9;=[8PCAH`Bl@"><field name="NUM">4</field></shadow></value></block></value><next><block type="device_play_note" id="(h.`o}Q|M^-suwZRFL?D"><value name="note"><shadow type="device_note" id="C1M0lF!;KH4nAlz:j1pg"><field name="name">587</field></shadow><block type="variables_get" id="]^hK47%)NWN]zRa~n(Cx"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field></block></value><value name="duration"><shadow type="device_beat" id="O`_Sl/!E.8SGsA~r)$tX"><field name="fraction">BeatFraction.Quarter</field></shadow></value><next><block type="pxt_controls_for" id="4NH{CW%}Wb3,vc?#Ob%("><value name="VAR"><shadow type="variables_get_reporter" id=",^-}(Rur(GQIpCyHE)Nc"><field name="VAR" id="8$J:~b4W:+uv.A(IDC1p">index</field></shadow></value><value name="TO"><shadow type="math_whole_number" id="D[9fU?8UakQ(}!4GuG-s"><field name="NUM">3</field></shadow></value><statement name="DO"><block type="device_pause" id="K.6bEf)Qn$ZxAeHG+JxU"><value name="pause"><shadow type="timePicker"><field name="ms">200</field></shadow><block type="variables_get" id="QqbIF+gCMB,dXWMJ:6*)"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field></block></value><next><block type="game_sprite_change_xy" id="$0l[FIs9pKLgz5M`~G6j"><field name="property">LedSpriteProperty.Y</field><value name="sprite"><block type="variables_get" id="cHUNWSxNs$AX=Fe|g?oA"><field name="VAR" id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</field></block></value><value name="value"><shadow type="math_number" id="%Uu:#Z60!6rP`*ar`38L"><field name="NUM">1</field></shadow></value></block></next></block></statement><next><block type="controls_if" id="ExIK)un7N,5=H5-xp:p9"><mutation else="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="game_sprite_touching_sprite" id="-r0AHoOyM/{}!F!df~0h"><value name="sprite"><block type="variables_get" id="JG|u4yqHl*998J+wZUN*"><field name="VAR" id="+W59bc@:eRYQ0J763oOc">SPACE_SHIP</field></block></value><value name="other"><block type="variables_get" id="C])eBLzZox:~e^=/R]*R"><field name="VAR" id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="#_n1|4+ZL9Ym]v51:cMk"><field name="VAR" id="J]W#.J}jw%i#HD#JnJnI">GAME_RUNNING</field><value name="VALUE"><shadow type="math_number" id="B|*,To+*;e7pCkJ,F.V:"><field name="NUM">0</field></shadow></value><next><block type="device_play_note" id="bZ01~`p.3%BL4DCAsh=n"><value name="note"><shadow type="device_note" id="#0[S_=Io/H`{7mEa}]o?"><field name="name">196</field></shadow></value><value name="duration"><shadow type="device_beat" id="Vjy+gJoy`q3bXmFP)bF|"><field name="fraction">BeatFraction.Breve</field></shadow></value><next><block type="game_delete_sprite" id="f*ozUt`4kcnEYWUlE;^h"><value name="this"><block type="variables_get" id="*J-.ghn%!~k#(fL:5xsr"><field name="VAR" id="gs[qV-{-x#+q`b4jU`7j">ASTEROID</field></block></value><next><block type="game_delete_sprite" id="lK(%$Z2lGY]wlRT}I_Gq"><value name="this"><block type="variables_get" id="0skLg@HJB50xI3xA*FxQ"><field name="VAR" id="+W59bc@:eRYQ0J763oOc">SPACE_SHIP</field></block></value><next><block type="controls_repeat_ext" id="SYbFI[@I+,DX.nWi.C:~"><value name="TIMES"><shadow type="math_whole_number" id="lw5`^Y~3DggqUr6oEjCg"><field name="NUM">3</field></shadow></value><statement name="DO"><block type="device_print_message" id="Uj!Y._nX8FkH8}a5kTK("><value name="text"><shadow type="text"><field name="TEXT">Hello!</field></shadow><block type="variables_get" id="`Sf#2-yw^fXQiHwn;Mye"><field name="VAR" id="T!UErrxJ*r|2zfos/1i|">SCORE</field></block></value><next><block type="device_pause" id="9T:!Q4z)4oFSisD.~sgZ"><value name="pause"><shadow type="timePicker" id="(WwLOb[{;R5Te|!ev_Dv"><field name="ms">1000</field></shadow></value></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement><statement name="ELSE"><block type="variables_change" id="WvA2%%c!khT}Z97#,,Sk"><field name="VAR" id="T!UErrxJ*r|2zfos/1i|">SCORE</field><value name="VALUE"><shadow type="math_number" id="aR(]H60DTF(=Z_rwKVuB"><field name="NUM">1</field></shadow></value><next><block type="controls_if" id="h`C$aJrK/}146`:N+ptu"><mutation elseif="2" else="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="7U6k:dnvzJp_6H9=gq)["><field name="OP">GTE</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="8qn`bHV,^f9URbtl~Z[{"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field></block></value><value name="B"><shadow type="math_number" id=".~3+7)5m$-ji;EiYprj."><field name="NUM">400</field></shadow></value></block></value><statement name="DO0"><block type="variables_change" id="^VntosK3iR(%,fSa/UO}"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field><value name="VALUE"><shadow type="math_number" id="xauzdI56m6$Sq_VbydFp"><field name="NUM">-20</field></shadow></value></block></statement><value name="IF1"><block type="logic_compare" id="Ir^.Q70GHD2|qC#(sZ`}"><field name="OP">GTE</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="zMA]g:0e[YTWea?Ut_tK"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field></block></value><value name="B"><shadow type="math_number" id="#O;0(nzEBTg,TrL9Fynr"><field name="NUM">300</field></shadow></value></block></value><statement name="DO1"><block type="controls_if" id="Vra5`,!z?j.mz{KBOlSP"><value name="IF0"><shadow type="logic_boolean" id="?J)s+UBZN9/BWx$[gwzG"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="2uB|!SX4{sSG|;mWxSNU"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="XZ;Z@B+QcAW^Ta{k],7r"><field name="NUM">0</field></shadow><block type="variables_get" id="JakJyb3}[/yRSrg.bBI`"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field></block></value><value name="B"><shadow type="math_number" id="2Ims_^~46U2ehcNM-H80"><field name="NUM">600</field></shadow></value></block></value><statement name="DO0"><block type="variables_change" id="{r+Wsy27k8r/IL+u)+op"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field><value name="VALUE"><shadow type="math_number" id="[/7yo:e~9yJ=kChcw*=3"><field name="NUM">100</field></shadow></value></block></statement><next><block type="variables_change" id="oC+Y|bkb-kRRvIfxd;l7"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field><value name="VALUE"><shadow type="math_number" id="NF-;%U5)k^CuG[4LY)v}"><field name="NUM">-20</field></shadow></value></block></next></block></statement><value name="IF2"><block type="logic_compare" id="7@7s|p8VxhT%M*3M!e0q"><field name="OP">GTE</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="kz;j*Kvs}NF.Fi;L40%#"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field></block></value><value name="B"><shadow type="math_number" id="~0jF#ei@srhK6{p5iV,1"><field name="NUM">200</field></shadow></value></block></value><statement name="DO2"><block type="controls_if" id="q3?md[S%D?/sD+oYq#sF"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="hUYWouitz:`*/%dXN,8l"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="Bhk$sg7|8BzTT=ZoI?a*"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field></block></value><value name="B"><shadow type="math_number" id="YgUH,I0Z/Dg10~N+CMkJ"><field name="NUM">700</field></shadow></value></block></value><statement name="DO0"><block type="variables_change" id="AD+VhjV(;bx:a-xrFIo]"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field><value name="VALUE"><shadow type="math_number" id="ZR/p89+svUcWse)F]9_~"><field name="NUM">100</field></shadow></value></block></statement><next><block type="variables_change" id="p.USA%=A}?D99zcpBlB`"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field><value name="VALUE"><shadow type="math_number" id=",/x[AtGg1MTNp|O(7~7,"><field name="NUM">-10</field></shadow></value></block></next></block></statement><statement name="ELSE"><block type="controls_if" id="079%lWiw`t,$cQr|.9|H"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="|x_.pKci}7K^3*}-p7?e"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="gEgurdy{WHmsC{Erir4P"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field></block></value><value name="B"><shadow type="math_number" id="Zy$mLT7{g]kP$26dpno!"><field name="NUM">800</field></shadow></value></block></value><statement name="DO0"><block type="variables_change" id="t_LZd^=++mA7!s5|_sV-"><field name="VAR" id="C^9^|bU`lx0;+5{H{tCJ">PITCH</field><value name="VALUE"><shadow type="math_number" id="1Gt+Mlz%U9bL$P;K~9m+"><field name="NUM">100</field></shadow></value></block></statement><next><block type="variables_change" id="P1SyqUV6Z.*-g|d9J#3}"><field name="VAR" id="jsJKm92AB=@s8x-~4m^{">SPEED</field><value name="VALUE"><shadow type="math_number" id="UNkB#,G9tvAyhr[5QdL("><field name="NUM">-5</field></shadow></value></block></next></block></statement></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_button_event" id=",Gt6#a-eTif9`%91mo%d" x="940" y="218"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="controls_if" id="1]3udhk6X.b5$PA^z]r1"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="e/9fwcZ%Ax;+*@-?`/P|"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="TkLhJ#o_EaELjatcxUv%"><field name="VAR" id="J]W#.J}jw%i#HD#JnJnI">GAME_RUNNING</field></block></value><value name="B"><shadow type="math_number" id="`4-j0MOH!Loguy$7Vn(e"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="game_sprite_change_xy" id="el4mnl.7jqaq4ah:N=jI"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="Weq[aw7F-Ha22BdU@f:^"><field name="VAR" id="+W59bc@:eRYQ0J763oOc">SPACE_SHIP</field></block></value><value name="value"><shadow type="math_number" id="JYi8-pUK,,wxnid5/8N_"><field name="NUM">-1</field></shadow></value></block></statement></block></statement></block><block type="device_button_event" id="SVL53A8UeIZOvX(n{S0N" x="939" y="478"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="controls_if" id="LV[l6-X2K,aUs-UckXLV"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="#+Onc$,V5ePk`i8-3`iQ"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="YK_k7fY5#I6a%y0ux07t"><field name="VAR" id="J]W#.J}jw%i#HD#JnJnI">GAME_RUNNING</field></block></value><value name="B"><shadow type="math_number" id="F?Nzk]Rz@-;jP]aT+%as"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="game_sprite_change_xy" id="*{%pGz!x_Vjx|t8i/X_`"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="u(vR8HI@zKh]tpfT^]oJ"><field name="VAR" id="+W59bc@:eRYQ0J763oOc">SPACE_SHIP</field></block></value><value name="value"><shadow type="math_number" id="!%P}j2n_.%a~:o?6RD.="><field name="NUM">1</field></shadow></value></block></statement></block></statement></block></xml>