Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var paused = false;
- function pause() {
- paused = !paused;
- }
- function char1() {
- if (!paused) {
- updateState();
- draw()
- pause();
- }
- };
- function char2() {
- if (!paused) {
- updateState();
- draw()
- pause();
- }
- };
- function char3() {
- if (!paused) {
- updateState();
- draw()
- pause();
- }
- };
- setInterval(function() {
- char1();
- char2();
- char3();
- }, 250)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement