Added sound effects!

This commit is contained in:
Justin Oros
2020-06-26 08:55:41 -07:00
parent 000a72b307
commit c77d99d4ab
5 changed files with 43 additions and 48 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 KiB

After

Width:  |  Height:  |  Size: 599 KiB

+4 -9
View File
@@ -1,4 +1,4 @@
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable type="KIND_SpriteKind" id="*q7{Qkgn6e2%{ia9Pg^t">Player</variable><variable type="KIND_SpriteKind" id="H/cK8Q4/lo)RGryfc;m0">Projectile</variable><variable type="KIND_SpriteKind" id="muMXJQx^8J($ORC__TxQ">Food</variable><variable type="KIND_SpriteKind" id="h7-ld9A[VX.1O(+c}AAS">Enemy</variable><variable id="*^zA_H8~{Hpb+Y34RW%r">babyYoda</variable><variable id="3RY#aiZc)5fV33wE+49`">bogey</variable><variable id="WYQFO,!3eo@:5f?gY%](">projectile</variable><variable id="2rfHk#x]#z(^)Q?2fwAS">bullet</variable><variable id="Q0]c8Cha(^sS7OM5PDN:">otherSprite</variable><variable id="}qgE@H11/-?7G?n$Ftc/">sprite</variable></variables><block type="pxt-on-start" id="8TpAlPp^xQ1dW6U5+aS," x="-10" y="-870"><statement name="HANDLER"><block type="variables_set" id="qTT@6e)5kXiL+E@+R:uW"><field name="VAR" id="*^zA_H8~{Hpb+Y34RW%r">babyYoda</field><value name="VALUE"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="-s)yGYYF|gR[=UO;bUv^"><value name="img"><shadow type="screen_image_picker" id="-8(H}n7OpuognB[efO(0"><field name="img">img`
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="(ZeszhlzicE9Efa[7}s;">bullet</variable><variable id="oLoEqxze#:LrI:c1H9C_">babyYoda</variable><variable id="s!]Qdo6;)H~!XZ0_=D+J">bogey</variable><variable type="KIND_SpriteKind" id=".Jkmuj(GeU|yu^zC1JGG">Player</variable><variable type="KIND_SpriteKind" id="i`?e}9oUb-CO|y$j2V45">Projectile</variable><variable type="KIND_SpriteKind" id=",F`z3pluA*phmJ@ssMV}">Food</variable><variable type="KIND_SpriteKind" id="7ITm_tppIifkF7Ua16u2">Enemy</variable></variables><block type="pxt-on-start" id="vyky{GfwG/pCE5*}Sa}A" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id=":qyTN0HU^%=U@Y_r=n:^"><field name="VAR" id="oLoEqxze#:LrI:c1H9C_">babyYoda</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="!k2xYiAryeAO%f3T4NFu"><value name="img"><shadow type="screen_image_picker" id="f9v6XrAEaUaM+5`.,w$y"><field name="img">img`
. . . b b b b b . 7 7 7 . . . .
. . b b d d c . 7 7 7 7 7 . . .
. b b d d b . 7 7 7 c c c . . .
@@ -15,17 +15,12 @@ b b d b b b b b b b b b b b b b
. . b b b d d d d d d d b b b .
. . . . b b d d d d d b b . . .
. . . . . b b b b b b b . . . .
`</field></shadow></value><value name="kind"><shadow type="spritekind" id=":?@rOMLek8D^684L|^vt"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="spritesetsetflag" id="3n%+9,z-V/_N^_roHZUx"><field name="flag">SpriteFlag.StayInScreen</field><value name="sprite"><block type="variables_get" id="1)?HEQ+ws]Qowsc~demo"><field name="VAR" id="*^zA_H8~{Hpb+Y34RW%r">babyYoda</field></block></value><value name="on"><shadow type="toggleOnOff" id="p-I(YM40[3;x3YwcwX!:"><field name="on">true</field></shadow></value><next><block type="hudSetLife" id="J)W;(_j?mwvg]?en%o(e"><value name="value"><shadow type="math_number" id="TW#!;$7_%;EZ`:Ehz)_3"><field name="NUM">3</field></shadow></value><next><block type="game_control_sprite" id="ruU|10tJ*5ET2k*o-joX"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><value name="sprite"><block type="variables_get" id="}cU1`{;JfPh{wyuiXh/O"><field name="VAR" id="*^zA_H8~{Hpb+Y34RW%r">babyYoda</field></block></value><value name="vx"><shadow type="math_number" id="8}fd/2tOJ75mybq0;wYF"><field name="NUM">200</field></shadow></value><value name="vy"><shadow type="math_number" id="EDY:SduiN2`I6tuD#qV7"><field name="NUM">200</field></shadow></value><next><block type="playMelody" id="oZ8P#6Hw|ppXw[}b}kTW"><value name="melody"><shadow type="melody_editor" id="ZP}6N_V3rz.9w.^yJ,a%"><field name="melody">"G F E C5 C5 C5 G G "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="9U)o0Y)z/BXLG?o)w~6;"><mutation min="40" max="500" label="Tempo" precision="0"/><field name="SLIDER">500</field></shadow></value><next><block type="playMelody" id="um10cb*8*U;LbJ|%v{Nd"><value name="melody"><shadow type="melody_editor" id="0o!-cS`LDFYr!jE|%9c2"><field name="melody">"G F E C5 C5 C5 G G "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="]Nzj5{n$6*-MX*rL2{pA"><mutation min="40" max="500" label="Tempo" precision="0"/><field name="SLIDER">500</field></shadow></value><next><block type="playMelody" id="NB7+ecdr1]_eaE)J}+Z*"><value name="melody"><shadow type="melody_editor" id="n}v!auXlGEYA#R;,x})U"><field name="melody">"E F C C C - - - "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="ET5f,v:xb,z}?$Mq/TRu"><mutation min="40" max="500" label="Tempo" precision="0"/><field name="SLIDER">400</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="spritesoverlap" id=";HcqqLmOsqSrk2N++To~" x="770" y="-710"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="#l-D*c|)p[tPRm|HW7Jm"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="fMg;|urJ92b{nn~KTNaF"><field name="MEMBER">Player</field></shadow></value><value name="HANDLER_DRAG_PARAM_otherSprite"><shadow type="argument_reporter_custom" id="%i?x-sM3lz!eGG*XE.+A"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></shadow></value><value name="otherKind"><shadow type="spritekind" id="ElV4-9)g`fh@NXd?9vdX"><field name="MEMBER">Enemy</field></shadow></value><statement name="HANDLER"><block type="spritedestroy" id="y?9x^o,1S)raSgVug@]2"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="variables_get" id="$R(40BA6UrW8Z!*lIrH?"><field name="VAR" id="Q0]c8Cha(^sS7OM5PDN:">otherSprite</field></block></value><next><block type="hudChangeLifeBy" id="`n4op-nhU$dbZdAfG0}{"><value name="value"><shadow type="math_number" id="yK036{rW#d^R!P#s!x@g"><field name="NUM">-1</field></shadow></value><next><block type="playMelody" id="yrpD5sU*_%t7ijg#$pJY"><value name="melody"><shadow type="melody_editor" id="OPG;qk)(B0=9#`3XTk#F"><field name="melody">"C5 C - - - - - - "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="Odzya(|Wm9De#0xZ}t]u"><mutation min="40" max="500" label="Tempo" precision="0"/><field name="SLIDER">1000</field></shadow></value></block></next></block></next></block></statement></block><block type="keyonevent" id="Q({2kIzouz4rc*{~wss`" x="-10" y="-410"><field name="button">controller.A</field><field name="event">ControllerButtonEvent.Pressed</field><statement name="HANDLER"><block type="variables_set" id="`,Q]z{+jOya4[ePP*VT0"><field name="VAR" id="2rfHk#x]#z(^)Q?2fwAS">bullet</field><value name="VALUE"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="spritescreateprojectilefromsprite" id="-e+W2]A}X=D2DG,W)fQ?"><value name="img"><shadow type="screen_image_picker"><field name="img">img`
. . . .
. . . .
4 4 5 5
. . . .
`</field></shadow><block type="screen_image_picker" id="se7BIEmi=a_Qd)T~A0Ra"><field name="img">img`
`</field></shadow></value><value name="kind"><shadow type="spritekind" id="D3,:t:ZBnF(.[FI`vI/f"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="spritesetsetflag" id="L9LM};Yv_`^C*m%[-T(."><field name="flag">SpriteFlag.StayInScreen</field><value name="sprite"><block type="variables_get" id="Fw!p[]fAZ)?NKK;1q-g["><field name="VAR" id="oLoEqxze#:LrI:c1H9C_">babyYoda</field></block></value><value name="on"><shadow type="toggleOnOff" id="Y(y+M~]@62-|~oUAMO;9"><field name="on">true</field></shadow></value><next><block type="hudSetLife" id="c/Og|[SZ:aHw!h^t7z!j"><value name="value"><shadow type="math_number" id=",voaQe)2kuc[m$;RGR=q"><field name="NUM">3</field></shadow></value><next><block type="game_control_sprite" id="A9[Nu^]a`mx;4wLZG(3n"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><value name="sprite"><shadow type="variables_get" id="(mHn[/AC`}sZx|3X.P]z"><field name="VAR" id="oLoEqxze#:LrI:c1H9C_">babyYoda</field></shadow></value><value name="vx"><shadow type="math_number" id="CG;zwI:~^lZ1i-Qu/mLm"><field name="NUM">200</field></shadow></value><value name="vy"><shadow type="math_number" id=")bXR|W_5a)3[jTgp[Ytu"><field name="NUM">200</field></shadow></value><next><block type="playMelody" id="{gqUwgooPlo{k_K;fhFz"><value name="melody"><shadow type="melody_editor" id="2}tnMr9S,@_m`A[ivHns"><field name="melody">"G F E C5 C5 C5 G G "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="AYFs+!?Aka1~DULQEQ5D"><mutation min="40" max="500" label="Number" precision="0"/><field name="SLIDER">500</field></shadow></value><next><block type="playMelody" id="%`.e]2bNGWh3,JOhXJ]U"><value name="melody"><shadow type="melody_editor" id="hzF8SA!pbXvp?j,O21kX"><field name="melody">"G F E C5 C5 C5 G G "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id=":I)~BIaW~s1V}5Zx]p)W"><mutation min="40" max="500" label="Number" precision="0"/><field name="SLIDER">500</field></shadow></value><next><block type="playMelody" id="/2lT|HlV(3pAB9C2LIVV"><value name="melody"><shadow type="melody_editor" id="OJ]Z]+n?d}#oX:Rj.^$o"><field name="melody">"E F C C C - - - "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="LiohDkj0KXb]@0_!S*_P"><mutation min="40" max="500" label="Number" precision="0"/><field name="SLIDER">400</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="spritesoverlap" id="-e07:@iJ(V+UYlwgXeZ|" x="780" y="160"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="V4V:S/^FdsOC2bH$$$_n"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="FMm;1MaLcJmWv]*7mTj%"><field name="MEMBER">Player</field></shadow></value><value name="HANDLER_DRAG_PARAM_otherSprite"><shadow type="argument_reporter_custom" id="}^[p}?|Dvlt^6@ZZM5%i"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></shadow></value><value name="otherKind"><shadow type="spritekind" id=";j`(Y:H}yeJ/RzbLw+$c"><field name="MEMBER">Enemy</field></shadow></value><statement name="HANDLER"><block type="spritedestroy" id="QW|[xl/*{a?Kn]geAKTH"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="argument_reporter_custom" id="9,vRFNC3!Ho#h?rQ]ta|"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></block></value><next><block type="hudChangeLifeBy" id="R#%fY6[=!=4OuW3VPnj}"><value name="value"><shadow type="math_number" id="f*,mU5sP$u)CR6*W:_vR"><field name="NUM">-1</field></shadow></value><next><block type="playMelody" id="4?cJ~2rBFRtXE5cfK%VA"><value name="melody"><shadow type="melody_editor" id="WL;1YuZj_I{2NuAEX22r"><field name="melody">"C5 C - - - - - - "</field></shadow></value><value name="tempo"><shadow type="math_number_minmax" id="L;R~0CsRjOOTLOK_P7:h"><mutation min="40" max="500" label="Number" precision="0"/><field name="SLIDER">1000</field></shadow></value></block></next></block></next></block></statement></block><block type="keyonevent" id="0yn[6%`BLjjGYpFE=rXy" x="0" y="460"><field name="button">controller.A</field><field name="event">ControllerButtonEvent.Pressed</field><statement name="HANDLER"><block type="variables_set" id="(Z(}5}mnt}X;7fNNe.75"><field name="VAR" id="(ZeszhlzicE9Efa[7}s;">bullet</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreateprojectilefromsprite" id="YX1_#aXLU}CbJHarbTf9"><value name="img"><shadow type="screen_image_picker" id="NV7H+7!}ZG|S%!_=N8ag"><field name="img">img`
. . . .
. . . .
5 5 5 5
. . . .
`</field></block></value><value name="sprite"><block type="variables_get" id="02/QQ3Ute+5pKVcH$-UE"><field name="VAR" id="*^zA_H8~{Hpb+Y34RW%r">babyYoda</field></block></value><value name="vx"><shadow type="spriteSpeedPicker" id="P:L+^!VllddfIH7/dL%0"><field name="speed">200</field></shadow></value><value name="vy"><shadow type="spriteSpeedPicker" id="OxQ1DsGHZn1;[_ncVVLl"><field name="speed">0</field></shadow></value></block></value></block></statement></block><block type="spritesoverlap" id="6oD()DeSlX_o;Yq@-t5s" x="770" y="-450"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="/B:BQl%[/gKOChfM{}Be"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="S|cmk|{LZd:+,LtP%,L@"><field name="MEMBER">Projectile</field></shadow></value><value name="HANDLER_DRAG_PARAM_otherSprite"><shadow type="argument_reporter_custom" id="7z3ERUMMMu}F`V8]pD(-"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></shadow></value><value name="otherKind"><shadow type="spritekind" id="_ygVMq^aE*S%flnrFV4("><field name="MEMBER">Enemy</field></shadow></value><statement name="HANDLER"><block type="spritedestroy" id="7p3Z0dZ[mn(q21}$HTN}"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="variables_get" id="XR*+MhY$GRi#X*FdL%ia"><field name="VAR" id="Q0]c8Cha(^sS7OM5PDN:">otherSprite</field></block></value><next><block type="spritedestroy" id="!Kf-YLpKXqpH4!$Au]|P"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><field name="effect">effects.fire</field><value name="sprite"><block type="variables_get" id="r.s8y|[f4s[uy6Hb`maP"><field name="VAR" id="}qgE@H11/-?7G?n$Ftc/">sprite</field></block></value><value name="duration"><shadow type="timePicker" id="GuhpLf,-i?sr42}WIHhP"><field name="ms">100</field></shadow></value><next><block type="hudChangeScoreBy" id="!ZVjKRo529C/6OA./yD!"><value name="value"><shadow type="math_number" id=".Ea3!x2J2D+_#x({%-.G"><field name="NUM">1</field></shadow></value><next><block type="mixer_play_sound" id="AF}:a65b@udARndBJzRS"><field name="sound">music.pewPew</field></block></next></block></next></block></next></block></statement></block><block type="gameinterval" id="dBF[Is90+qa)c)|l.B;2" x="-10" y="-230"><value name="period"><shadow type="timePicker" id="W2W0~L]A7j^p%|-j}p|v"><field name="ms">500</field></shadow></value><statement name="HANDLER"><block type="variables_set" id="x1{(8KY0Lg3P3Pu]X#:|"><field name="VAR" id="3RY#aiZc)5fV33wE+49`">bogey</field><value name="VALUE"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="qw~O_8gEcq6Yvy,zvxdz"><value name="img"><shadow type="screen_image_picker" id="Rg?:FBYy8UQ91G5eUcFC"><field name="img">img`
`</field></shadow></value><value name="sprite"><shadow type="variables_get" id="kE}.L?~JANA2FCzx,w=H"><field name="VAR" id="oLoEqxze#:LrI:c1H9C_">babyYoda</field></shadow></value><value name="vx"><shadow type="spriteSpeedPicker" id="F,[#QG#=vLUlvV;^.i@Y"><field name="speed">200</field></shadow></value><value name="vy"><shadow type="spriteSpeedPicker" id="z9,qtB@7c%[:dJWmlfS*"><field name="speed">0</field></shadow></value></block></value></block></statement></block><block type="spritesoverlap" id="7.gO-W*!MMzrIwYSiRwG" x="780" y="420"><value name="HANDLER_DRAG_PARAM_sprite"><shadow type="argument_reporter_custom" id="x9AEowDG4|aC{$7(Agvo"><mutation typename="Sprite"/><field name="VALUE">sprite</field></shadow></value><value name="kind"><shadow type="spritekind" id="HhA_2|P4rgvsDe?#I,ZP"><field name="MEMBER">Projectile</field></shadow></value><value name="HANDLER_DRAG_PARAM_otherSprite"><shadow type="argument_reporter_custom" id="J_~nK:K$)H=9xXo4j{zl"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></shadow></value><value name="otherKind"><shadow type="spritekind" id="utK~IR3$x2N[KgQ5ohib"><field name="MEMBER">Enemy</field></shadow></value><statement name="HANDLER"><block type="spritedestroy" id="P;kc-Mu8HWjb]i-=;agA"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="argument_reporter_custom" id="nHPnPykP}`PhFdxYfEjT"><mutation typename="Sprite"/><field name="VALUE">otherSprite</field></block></value><next><block type="spritedestroy" id="/wvfQcso_Zr:Gu2!u,de"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="2" _input_init="true"></mutation><field name="effect">effects.fire</field><value name="sprite"><block type="argument_reporter_custom" id="C1ItT|Ja|1khHRDHDbRW"><mutation typename="Sprite"/><field name="VALUE">sprite</field></block></value><value name="duration"><shadow type="timePicker" id="GG6iMRe,Btkvon`YD$|t"><field name="ms">100</field></shadow></value><next><block type="hudChangeScoreBy" id="FrS73+0UQg}:PGPldD!e"><value name="value"><shadow type="math_number" id="yvqz^ylF_R=?r`-{A%/|"><field name="NUM">1</field></shadow></value><next><block type="mixer_play_sound" id="ppw:NU.mgKf:{l^eqx{9"><field name="sound">music.pewPew</field></block></next></block></next></block></next></block></statement></block><block type="gameinterval" id="aS7;;/o%rKCQPx2WuLxX" x="0" y="640"><value name="period"><shadow type="timePicker" id="Ko0#c=nu#Z*2gxK(v{vW"><field name="ms">500</field></shadow></value><statement name="HANDLER"><block type="variables_set" id="$Wh$0ny[k1Hxr#tgQaB$"><field name="VAR" id="s!]Qdo6;)H~!XZ0_=D+J">bogey</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="w25W@VoDg[!Br.Kqx!lj"><value name="img"><shadow type="screen_image_picker" id="Q2=z0ua_UaoH+*dwuN?X"><field name="img">img`
. . . . . . . . . . . . . . . .
. . . . . . . b b b b b b b . .
. . . . . . b b c b c c c c b b
@@ -42,4 +37,4 @@ b c c c c c c c b c c c c c b b
. . . . . b b c c b c c c c c b
. . . . . . b b c b c c c b b b
. . . . . . . b b b b b b b . .
`</field></shadow></value><value name="kind"><shadow type="spritekind" id="5pc/TK{|.2k.hNvv:hd3"><field name="MEMBER">Enemy</field></shadow></value></block></value><next><block type="spritesetvel" id="Hjx*pf/b#;cH@#G;(HuK"><value name="sprite"><block type="variables_get" id="i3+tHUSe[.S=8jTtv-Ih"><field name="VAR" id="3RY#aiZc)5fV33wE+49`">bogey</field></block></value><value name="vx"><shadow type="spriteSpeedPicker" id="rG/q)ACMM?frx#1bo|8R"><field name="speed">-100</field></shadow></value><value name="vy"><shadow type="spriteSpeedPicker" id="f0l$;Emws6AsY~nf2[`q"><field name="speed">0</field></shadow></value><next><block type="spritesetpos" id="trkb:jmEc?mcj5();~/x"><value name="sprite"><block type="variables_get" id="QVhYpO#~kQF22gP/FW|O"><field name="VAR" id="3RY#aiZc)5fV33wE+49`">bogey</field></block></value><value name="x"><shadow type="positionPicker" id="2X?$TZ[UIO5R#LquiZ)`"><field name="index">180</field></shadow></value><value name="y"><shadow type="positionPicker"><field name="index">120</field></shadow><block type="device_random" id="RAa]JEe|ezx,7PZ]+S,p"><value name="min"><shadow type="math_number" id="u}{5L^SrfFX)^$V$:e*p"><field name="NUM">0</field></shadow></value><value name="limit"><shadow type="math_number" id="QubF.O.UZD|n5,W{c7VC"><field name="NUM">120</field></shadow></value></block></value></block></next></block></next></block></statement></block></xml>
`</field></shadow></value><value name="kind"><shadow type="spritekind" id="k1}RB*xpr-G1T-`|ZD+N"><field name="MEMBER">Enemy</field></shadow></value></block></value><next><block type="spritesetvel" id="0whCR/PDZU.BYe+ouq{#"><value name="sprite"><block type="variables_get" id="B~+;cH3VqXHft3[15r|,"><field name="VAR" id="s!]Qdo6;)H~!XZ0_=D+J">bogey</field></block></value><value name="vx"><shadow type="spriteSpeedPicker" id="vF?Sw?,3[@Zubz(WWnVU"><field name="speed">-100</field></shadow></value><value name="vy"><shadow type="spriteSpeedPicker" id="8YTzx;-R|!yvtCF6^{Sf"><field name="speed">0</field></shadow></value><next><block type="spritesetpos" id="*w-[G5d-D#9~|]!291hH"><value name="sprite"><block type="variables_get" id="]^l){2Pg;58XzxLWYGrA"><field name="VAR" id="s!]Qdo6;)H~!XZ0_=D+J">bogey</field></block></value><value name="x"><shadow type="positionPicker" id="|K:fMV#/2$=wQT4ce-yk"><field name="index">180</field></shadow></value><value name="y"><shadow type="positionPicker"/><block type="device_random" id="RjcO*/rtX2{-,0ruRTjo"><value name="min"><shadow type="math_number" id="%U4BRdjEF*u;DDY5vqj3"><field name="NUM">0</field></shadow></value><value name="limit"><shadow type="math_number" id="j7L#,bU2#HMX5dkvQ0p/"><field name="NUM">120</field></shadow></value></block></value></block></next></block></next></block></statement></block></xml>
+38 -38
View File
@@ -6,11 +6,11 @@ sprites.onOverlap(SpriteKind.Projectile, SpriteKind.Enemy, function (sprite, oth
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
bullet = sprites.createProjectileFromSprite(img`
. . . .
. . . .
5 5 5 5
. . . .
`, babyYoda, 200, 0)
. . . .
. . . .
5 5 5 5
. . . .
`, babyYoda, 200, 0)
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
otherSprite.destroy()
@@ -21,22 +21,22 @@ let bogey: Sprite = null
let bullet: Sprite = null
let babyYoda: Sprite = null
babyYoda = sprites.create(img`
. . . b b b b b . 7 7 7 . . . .
. . b b d d c . 7 7 7 7 7 . . .
. b b d d b . 7 7 7 c c c . . .
. b d d b c 7 7 7 7 7 c c . . .
b b d d c . 7 7 7 7 7 7 7 . . .
b d d d b 7 7 7 7 e e 7 7 . . .
b b d d c 7 . . e e e e e . . .
. b b b b . . . 7 7 7 e e . . .
b b d b c b c b 7 7 f f f b c b
b d d d b d d d d 7 f d d d d b
b b d b b b b b b b b b b b b b
. b b b d d d d d d d d d d b .
. . b d d d d d d d d d d d b .
. . b b b d d d d d d d b b b .
. . . . b b d d d d d b b . . .
. . . . . b b b b b b b . . . .
. . . b b b b b . 7 7 7 . . . .
. . b b d d c . 7 7 7 7 7 . . .
. b b d d b . 7 7 7 c c c . . .
. b d d b c 7 7 7 7 7 c c . . .
b b d d c . 7 7 7 7 7 7 7 . . .
b d d d b 7 7 7 7 e e 7 7 . . .
b b d d c 7 . . e e e e e . . .
. b b b b . . . 7 7 7 e e . . .
b b d b c b c b 7 7 f f f b c b
b d d d b d d d d 7 f d d d d b
b b d b b b b b b b b b b b b b
. b b b d d d d d d d d d d b .
. . b d d d d d d d d d d d b .
. . b b b d d d d d d d b b b .
. . . . b b d d d d d b b . . .
. . . . . b b b b b b b . . . .
`, SpriteKind.Player)
babyYoda.setFlag(SpriteFlag.StayInScreen, true)
info.setLife(3)
@@ -46,23 +46,23 @@ music.playMelody("G F E C5 C5 C5 G G ", 500)
music.playMelody("E F C C C - - - ", 400)
game.onUpdateInterval(500, function () {
bogey = sprites.create(img`
. . . . . . . . . . . . . . . .
. . . . . . . b b b b b b b . .
. . . . . . b b c b c c c c b b
. . . . . b b c c b c c c c c b
. b b b b c c c b c c c c c c b
b c c c c c c c b c c c c c b b
b b b b b b b b b b b b b b b .
. . . . . . . b 1 b b c c c b b
. . . . . . b b c b c c c c c b
. . . . . . . b 1 b b c c c b b
b b b b b b b b b b b b b b b .
b c c c c c c c b c c c c c b b
. b b b b c c c b c c c c c c b
. . . . . b b c c b c c c c c b
. . . . . . b b c b c c c b b b
. . . . . . . b b b b b b b . .
`, SpriteKind.Enemy)
. . . . . . . . . . . . . . . .
. . . . . . . b b b b b b b . .
. . . . . . b b c b c c c c b b
. . . . . b b c c b c c c c c b
. b b b b c c c b c c c c c c b
b c c c c c c c b c c c c c b b
b b b b b b b b b b b b b b b .
. . . . . . . b 1 b b c c c b b
. . . . . . b b c b c c c c c b
. . . . . . . b 1 b b c c c b b
b b b b b b b b b b b b b b b .
b c c c c c c c b c c c c c b b
. b b b b c c c b c c c c c c b
. . . . . b b c c b c c c c c b
. . . . . . b b c b c c c b b b
. . . . . . . b b b b b b b . .
`, SpriteKind.Enemy)
bogey.setVelocity(-100, 0)
bogey.setPosition(180, Math.randomRange(0, 120))
})
+1 -1
View File
@@ -9,7 +9,7 @@
"main.ts",
"README.md"
],
"preferredEditor": "tsprj",
"preferredEditor": "blocksprj",
"testFiles": [
"test.ts"
]