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 55dbd3a commit 513eba6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Binary file added .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 added .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"><block type="pxt-on-start" id=")M/g`hP#qW$W:D?MSIiu" x="20" y="20"></block><block type="device_forever" id=";=l+h]p;LObWqAw]oe9r" x="225" y="20"></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></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_forever" id=";=l+h]p;LObWqAw]oe9r" x="205" y="0"></block><block type="device_button_event" id="VZj}V.BvOJ@6p#(n.l@Z" x="128" y="396"><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="88" y="518"><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></xml>
8 changes: 8 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
input.onButtonPressed(Button.A, function () {
ship.move(-1)
})
input.onButtonPressed(Button.B, function () {
ship.move(1)
})
let ship: game.LedSprite = null
ship = game.createSprite(2, 4)
basic.forever(function () {

})

1 comment on commit 513eba6

@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.