Created
April 2, 2020 23:59
-
-
Save omariosouto/3f94dcf3b1ec24e92bb6d0d5d558fc1e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // | |
| // [Telas] | |
| // | |
| const globais = {}; | |
| let telaAtiva = {}; | |
| function mudaParaTela(novaTela) { | |
| telaAtiva = novaTela; | |
| if(telaAtiva.inicializa) { | |
| telaAtiva.inicializa(); | |
| } | |
| } | |
| const Telas = { | |
| INICIO: { | |
| inicializa() { | |
| globais.flappyBird = criaFlappyBird(); | |
| }, | |
| desenha() { | |
| planoDeFundo.desenha(); | |
| chao.desenha(); | |
| globais.flappyBird.desenha(); | |
| mensagemGetReady.desenha(); | |
| }, | |
| click() { | |
| mudaParaTela(Telas.JOGO); | |
| }, | |
| atualiza() { | |
| } | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment