diff --git a/examples/controller_test.flock b/examples/controller_test.flock new file mode 100644 index 00000000..4fae26ae --- /dev/null +++ b/examples/controller_test.flock @@ -0,0 +1,432 @@ +{ + "blocks": { + "languageVersion": 0, + "blocks": [ + { + "type": "forever", + "id": "xCAhc4}q0tpr-~H,t_JO", + "x": 10, + "y": 10, + "extraState": "", + "inputs": { + "DO": { + "block": { + "type": "controls_if", + "id": ",9Q{8)m._d@fY%EU{K,!", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "_Un*H(QhbU:X.rr+8B29", + "fields": { + "ACTION": "FORWARD" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "yxVa|4{*8~%5QYpdJ_SN", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "MIGI7W9BP0G4BA5#}~CL", + "fields": { + "TEXT": "Forward" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "k@}Ru5_HQr7dbb699/m*", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "C3]t.6cSDl}78M)Tp*1e", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": "{qd0%[1wa84![LIHTX_}", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "AX7UU:cQ~yEGZyhnKjy)", + "fields": { + "ACTION": "BACKWARD" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "@H_UUCTmHQ{_1M_lrq)c", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "`z6nMx4(O$v~;UQwI:}Q", + "fields": { + "TEXT": "Backward" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "P4PhDx;dwwj$ZfwckYb9", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "~5K@8v_7cVw8u$kJi0n,", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": "bpuA=X2uY_@[8*n.G3+q", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "`%3/opdZ4-rEi~ry4,(6", + "fields": { + "ACTION": "LEFT" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "O*6w|EYY4)n]S]m)K$N;", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "zZtVFU~y!qdfz_uLr{f/", + "fields": { + "TEXT": "Left" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "c}y3tDLo1e5wVx`!n@L#", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "X(_~,Sz9,Bj`OObw?m.I", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": "KvF6U-:rU1HJx}:2:CVT", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "B~iwBz8)(zi)_$VqU}{A", + "fields": { + "ACTION": "RIGHT" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "Awy4fJDHTLt(E3p:eOv3", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "sGR7jOqv-6mzLb]aGcSl", + "fields": { + "TEXT": "Right" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "*r}YWJ7Cq~@=F9WR*I!o", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "TU{C|f|9}{n_N;KpjcVx", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": "BPloZdPNZ|KurL%WX{MO", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "qK@;~oYOwO8/AU@{Mk)/", + "fields": { + "ACTION": "BUTTON1" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "Mu-VrjG77Z.7r;sN@.A{", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "e(x!LoDUv}7UVx}#^4v_", + "fields": { + "TEXT": "Button 1" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "/Z%d]O4]Ju]#M[@fSh=7", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "`4x?Z]$l`-5a?|oDwbPm", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": "]kA;ku6/zOt)CqwIcLBS", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "_^B{hKhHiPz}_0Sx[PFX", + "fields": { + "ACTION": "BUTTON2" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "*ZEkey#2L,^BTr[-l5lg", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "q;W=V5O)xN$Z?yK?jjri", + "fields": { + "TEXT": "Button 2" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "S:NkCgr5xaK!P(@LrJmt", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "]3B!J^pia|DaN848Vb![", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": "ejVQ,p:jt!(cuV@b4U4I", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "X!{WHi5?;$7cl!Vse(Rn", + "fields": { + "ACTION": "BUTTON3" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "J/H~p8]b=(E3M:hc(2e5", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "cm:^prVfK*`{1a@R|Qci", + "fields": { + "TEXT": "Button 3" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "8]GgrXqWG|eMVe=}mILZ", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "VuVnL8RX9mo3#S~beFAL", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + }, + "next": { + "block": { + "type": "controls_if", + "id": ")[/|/skks5/i1Sg;z8wr", + "inputs": { + "IF0": { + "block": { + "type": "action_pressed", + "id": "BuBXSuk@([VQIa+GJ1nr", + "fields": { + "ACTION": "BUTTON4" + } + } + }, + "DO0": { + "block": { + "type": "print_text", + "id": "O{X^(c?$eT$Za1.EY0y:", + "inputs": { + "TEXT": { + "shadow": { + "type": "text", + "id": "3;n@hCP|);O4l@K}0B)K", + "fields": { + "TEXT": "Button 4" + } + } + }, + "DURATION": { + "shadow": { + "type": "math_number", + "id": "hdNt^JlEA,X;Vl41u%^L", + "fields": { + "NUM": 0.5 + } + } + }, + "COLOR": { + "shadow": { + "type": "colour", + "id": "^1V575C!_.GdPqPDB{ji", + "fields": { + "COLOR": "#000080" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/index.html b/index.html index 860fcaaf..8d2cd3d4 100644 --- a/index.html +++ b/index.html @@ -878,6 +878,7 @@