Debian Codegraph @

online/static/samples/WiFi and Games/Rotation Controlled Bird.xml

raw symbols SCIP
1 <xml xmlns="https://developers.google.com/blockly/xml">
2 <description>
3 <![CDATA[
4
5 ## Bird game
6
7 Tilt your phone up and down to move the bird up/Down.
8
9 addGame: Create a game
10 set bird altitude; The height of the bird from the floor of the game box is set to the input number. It should be between 0(floor), and 1000(Roof)
11
12
13 Your phone has a built in rotation sensor.
14
15 The rotation values are between -1 and 1
16
17 These readings are measured and scaled to 0 to 1000 range by using basic arithmetic operators, and are then used to set the height of the character in the game.
18
19 Tilt your phone up and down to move the bird up/Down.
20 ]]>
21 </description>
22 <variables>
23 <variable id="(eG:3Li8hL6{B*coh|%{">height</variable>
24 </variables>
25 <block type="add_game" id="3YCPo!vOJS|o7/NBf9#[" x="0" y="-322">
26 <next>
27 <block type="controls_repeat_ext" id="ng~P`Ol9-.[1q1=SN^pU">
28 <value name="TIMES">
29 <shadow type="math_number" id="eCAq7h,Tp#T#5#UXVdMa">
30 <field name="NUM">10000</field>
31 </shadow>
32 </value>
33 <statement name="DO">
34 <block type="variables_set" id="_7zX2{OAM)%2nV1uq|00">
35 <field name="VAR" id="(eG:3Li8hL6{B*coh|%{">height</field>
36 <value name="VALUE">
37 <block type="math_arithmetic" id="bxX+.6.-Mea/_I|nK(:]">
38 <field name="OP">MULTIPLY</field>
39 <value name="A">
40 <shadow type="math_number" id="M3ty:b[3c|X8FDz740HX">
41 <field name="NUM">1000</field>
42 </shadow>
43 </value>
44 <value name="B">
45 <shadow type="math_number" id="DV.Iq`Mh[$.DMy[h2}xW">
46 <field name="NUM">1</field>
47 </shadow>
48 <block type="math_arithmetic" id="T2qeHGql10R}hNN(M1;o">
49 <field name="OP">ADD</field>
50 <value name="A">
51 <shadow type="math_number" id=";R3patlab5y=evq-^@Yi">
52 <field name="NUM">0.5</field>
53 </shadow>
54 </value>
55 <value name="B">
56 <shadow type="math_number" id="AdL01;T2iZA,/Dg-RDG}">
57 <field name="NUM">1</field>
58 </shadow>
59 <block type="get_phone_rotation" id="|AfP$w:8D=snjS5@S+*_">
60 <field name="CHANNEL">0</field>
61 </block>
62 </value>
63 </block>
64 </value>
65 </block>
66 </value>
67 <next>
68 <block type="set_bird_y" id="Wl.)ky-Wt!w[_:zKLo#L">
69 <value name="Y">
70 <shadow type="math_number" id="S~pg(N]Su,l~c-0Rl9*m">
71 <field name="NUM">200</field>
72 </shadow>
73 <block type="variables_get" id="zI_Fr`@g#$9C4I8yx(AN">
74 <field name="VAR" id="(eG:3Li8hL6{B*coh|%{">height</field>
75 </block>
76 </value>
77 </block>
78 </next>
79 </block>
80 </statement>
81 <next>
82 <block type="stop_game" id="csu/*}K@-iRufK-do++G"></block>
83 </next>
84 </block>
85 </next>
86 </block>
87 </xml>