Last active
January 17, 2020 06:23
-
-
Save gabrielflorit/7d3e6fa5334308f68fb6da5b335ab276 to your computer and use it in GitHub Desktop.
SCRIPT-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0": { | |
"0": { | |
"0": 3, | |
"1": 2, | |
"2": 1, | |
"3": 0 | |
}, | |
"1": { | |
"0": 3, | |
"1": 2, | |
"2": 1, | |
"3": 0 | |
}, | |
"2": { | |
"0": 3 | |
}, | |
"3": { | |
"0": 3 | |
}, | |
"4": { | |
"0": 3 | |
}, | |
"5": { | |
"0": 3 | |
}, | |
"6": { | |
"0": 3 | |
}, | |
"7": { | |
"0": 3 | |
}, | |
"8": { | |
"0": 3 | |
}, | |
"9": { | |
"0": 3 | |
}, | |
"10": { | |
"0": 3 | |
}, | |
"11": { | |
"0": 1 | |
}, | |
"12": { | |
"0": 3 | |
}, | |
"13": { | |
"0": 3 | |
}, | |
"14": { | |
"0": 3 | |
}, | |
"15": { | |
"0": 3 | |
}, | |
"tempo": "3" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init = state => { | |
state.actors = [ | |
{ | |
id: 'ball', | |
x: 64, | |
y: 64, | |
sprite: 0 | |
} | |
] | |
} | |
update = (state, input, elapsed) => { | |
const ball = state.actors.find(actor => actor.id === 'ball') | |
if (input.downPressed) { | |
ball.y++ | |
} | |
if (input.upPressed) { | |
ball.y-- | |
playSong(0) | |
} | |
} | |
draw = state => { | |
clear() | |
rectStroke(0, 0, 128, 128, 0) | |
drawActors(state) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"iframeVersion": "0.1.272", | |
"lines": [ | |
28, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0 | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0": { | |
"notes": [ | |
"0b37", | |
"1a#37", | |
"2a37", | |
"3g#37", | |
"4g37", | |
"5f#37", | |
"6f37", | |
"7e37", | |
"8d#37", | |
"9d37", | |
"10c#37", | |
"11c37", | |
"12c#37", | |
"13d37", | |
"14d#37", | |
"15e37" | |
], | |
"tempo": "4" | |
}, | |
"1": { | |
"notes": [ | |
"1a#37" | |
], | |
"tempo": 0 | |
}, | |
"2": { | |
"notes": [ | |
"2a37" | |
], | |
"tempo": 0 | |
}, | |
"3": { | |
"notes": [ | |
"3g#37" | |
], | |
"tempo": 0 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0": { | |
"0": 0 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0": [ | |
" 00000 ", | |
" 00 000", | |
"0 000 0", | |
"0 0 0", | |
" 0 00", | |
"00 0000 ", | |
" 00 0 ", | |
" 000 " | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment