Skip to content

Commit

Permalink
Отправляем снаряд
Browse files Browse the repository at this point in the history
  • Loading branch information
ExplorerEccavo committed Mar 29, 2023
1 parent 9b4eef8 commit 76263db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Binary file modified .github/makecode/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/makecode/blocksdiff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion main.blocks
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="({oC5sBb.e}SmjbR,ul)">ship</variable><variable id="AO``%0[Z_D?t}cF}z:PB">sprite</variable><variable id="5sMgKO9CT2E?1`YL?@t+">shoot</variable></variables><block type="pxt-on-start" id=")M/g`hP#qW$W:D?MSIiu" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="vEcZ1!0dR#66U^H0dlG6"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field><value name="VALUE"><shadow type="math_number" id="Mv$P6t8Uy7]W^yUT0Q}y"><field name="NUM">0</field></shadow><block type="game_create_sprite" id="h~59MgXR^cjl29`^l~k4"><value name="x"><shadow type="math_number" id="D~.v6yOFftcp}u_RCgmk"><field name="NUM">2</field></shadow></value><value name="y"><shadow type="math_number" id="J@A12)Z8@h}s|YU5.!7,"><field name="NUM">4</field></shadow></value></block></value></block></statement></block><block type="device_button_event" id="VZj}V.BvOJ@6p#(n.l@Z" x="-3" y="134"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="game_move_sprite" id="8fHkbL#pK90|Qs1IBQ_!"><value name="sprite"><block type="variables_get" id="~B?c{Rs]3GZrWaUT=}vI"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value><value name="leds"><shadow type="math_number" id="8}Nwc?PSS7KtS)a8{T3F"><field name="NUM">-1</field></shadow></value></block></statement></block><block type="device_button_event" id="o_75{eDSldYKy[,,~dE{" x="4" y="309"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="game_move_sprite" id="G%FA-97wQYOU#UH!+-gs"><value name="sprite"><block type="variables_get" id="}+z3F;zHi8!2Hw|d*7gT"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value><value name="leds"><shadow type="math_number" id="oFEYg|98?HC);Y-1cmEX"><field name="NUM">1</field></shadow></value></block></statement></block><block type="device_button_event" id="fHr*8cr/lSR+J#{T;Kh:" x="34" y="465"><field name="NAME">Button.AB</field><statement name="HANDLER"><block type="variables_set" id="J]X@``~iwN=U@SAjDGE3"><field name="VAR" id="5sMgKO9CT2E?1`YL?@t+">shoot</field><value name="VALUE"><shadow type="math_number" id="BDeMA?7rgp+HeoS]!?tu"><field name="NUM">0</field></shadow><block type="game_create_sprite" id="PN|%]U~iS;co/BNJ/KMI"><value name="x"><shadow type="math_number" id="43bCB:ID#M=hw)];?=CP"><field name="NUM">2</field></shadow><block type="game_sprite_property" id="4KwE=bqbBVYgl70zmg^b"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="w%`.;%[oCpqvsVsuj4r:"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value></block></value><value name="y"><shadow type="math_number" id="AJY)nK!n{UO.6C/e/y%_"><field name="NUM">2</field></shadow><block type="game_sprite_property" id="l;ut{ce!uyQe0o`rr*4x"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="ow0$z-2QyF!!$[L|E/47"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value></block></value></block></value></block></statement></block><block type="variables_get" id=":GWuTKrfY%Py7a!L/[#H" disabled="true" x="574" y="580"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block><block type="variables_get" id="sCkcM0ETqYHY[yCjh-R(" disabled="true" x="819" y="573"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></xml>
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="({oC5sBb.e}SmjbR,ul)">ship</variable><variable id="AO``%0[Z_D?t}cF}z:PB">sprite</variable><variable id="5sMgKO9CT2E?1`YL?@t+">shoot</variable><variable id="-2d~lcL5y=GHSU[%y@in">this</variable></variables><block type="pxt-on-start" id=")M/g`hP#qW$W:D?MSIiu" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="vEcZ1!0dR#66U^H0dlG6"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field><value name="VALUE"><shadow type="math_number" id="Mv$P6t8Uy7]W^yUT0Q}y"><field name="NUM">0</field></shadow><block type="game_create_sprite" id="h~59MgXR^cjl29`^l~k4"><value name="x"><shadow type="math_number" id="D~.v6yOFftcp}u_RCgmk"><field name="NUM">2</field></shadow></value><value name="y"><shadow type="math_number" id="J@A12)Z8@h}s|YU5.!7,"><field name="NUM">4</field></shadow></value></block></value></block></statement></block><block type="device_button_event" id="VZj}V.BvOJ@6p#(n.l@Z" x="-3" y="134"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="game_move_sprite" id="8fHkbL#pK90|Qs1IBQ_!"><value name="sprite"><block type="variables_get" id="~B?c{Rs]3GZrWaUT=}vI"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value><value name="leds"><shadow type="math_number" id="8}Nwc?PSS7KtS)a8{T3F"><field name="NUM">-1</field></shadow></value></block></statement></block><block type="device_button_event" id="o_75{eDSldYKy[,,~dE{" x="4" y="309"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="game_move_sprite" id="G%FA-97wQYOU#UH!+-gs"><value name="sprite"><block type="variables_get" id="}+z3F;zHi8!2Hw|d*7gT"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value><value name="leds"><shadow type="math_number" id="oFEYg|98?HC);Y-1cmEX"><field name="NUM">1</field></shadow></value></block></statement></block><block type="device_button_event" id="fHr*8cr/lSR+J#{T;Kh:" x="34" y="465"><field name="NAME">Button.AB</field><statement name="HANDLER"><block type="variables_set" id="J]X@``~iwN=U@SAjDGE3"><field name="VAR" id="5sMgKO9CT2E?1`YL?@t+">shoot</field><value name="VALUE"><shadow type="math_number" id="BDeMA?7rgp+HeoS]!?tu"><field name="NUM">0</field></shadow><block type="game_create_sprite" id="PN|%]U~iS;co/BNJ/KMI"><value name="x"><shadow type="math_number" id="43bCB:ID#M=hw)];?=CP"><field name="NUM">2</field></shadow><block type="game_sprite_property" id="4KwE=bqbBVYgl70zmg^b"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="w%`.;%[oCpqvsVsuj4r:"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value></block></value><value name="y"><shadow type="math_number" id="AJY)nK!n{UO.6C/e/y%_"><field name="NUM">2</field></shadow><block type="game_sprite_property" id="l;ut{ce!uyQe0o`rr*4x"><field name="property">LedSpriteProperty.X</field><value name="sprite"><block type="variables_get" id="ow0$z-2QyF!!$[L|E/47"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block></value></block></value></block></value><next><block type="controls_repeat_ext" id="hculY(Y(QjYp]2{#a|UI"><value name="TIMES"><shadow type="math_whole_number" id="_ao=w*0,1w;hXFG0e4z5"><field name="NUM">4</field></shadow></value><statement name="DO"><block type="game_sprite_change_xy" id="X_S9]PR%5?*m-jTTtW4S"><field name="property">LedSpriteProperty.Y</field><value name="sprite"><block type="variables_get" id="WB02eQ):b__f`tN%`@cK"><field name="VAR" id="5sMgKO9CT2E?1`YL?@t+">shoot</field></block></value><value name="value"><shadow type="math_number" id="O(^LI9iP)576XsP5hrLx"><field name="NUM">-1</field></shadow></value><next><block type="device_pause" id="3VBY*ULHp41IMiEa!}Be"><value name="pause"><shadow type="timePicker" id=")a[l(.{]gPfrK(_3qpJA"><field name="ms">150</field></shadow></value></block></next></block></statement><next><block type="game_delete_sprite" id="BIK%P)EY+qK7|$Hrn@1,"><value name="this"><block type="variables_get" id="=B(fn)7g:Q;#4r`{IJl{"><field name="VAR" id="5sMgKO9CT2E?1`YL?@t+">shoot</field></block></value></block></next></block></next></block></statement></block><block type="variables_get" id=":GWuTKrfY%Py7a!L/[#H" disabled="true" x="574" y="580"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block><block type="variables_get" id="sCkcM0ETqYHY[yCjh-R(" disabled="true" x="819" y="573"><field name="VAR" id="({oC5sBb.e}SmjbR,ul)">ship</field></block><block type="device_pause" id="Z]9D`$xLnEs^Pl?/wE];" disabled="true" x="371" y="866"><value name="pause"><shadow type="timePicker" id="T*LauFxu6v3),zyiyTWp" disabled="true"><field name="ms">100</field></shadow></value></block></xml>
5 changes: 5 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ input.onButtonPressed(Button.A, function () {
})
input.onButtonPressed(Button.AB, function () {
shoot = game.createSprite(ship.get(LedSpriteProperty.X), ship.get(LedSpriteProperty.X))
for (let index = 0; index < 4; index++) {
shoot.change(LedSpriteProperty.Y, -1)
basic.pause(150)
}
shoot.delete()
})
input.onButtonPressed(Button.B, function () {
ship.move(1)
Expand Down

1 comment on commit 76263db

@ExplorerEccavo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.