Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ANTES
- -- Preencher a tabela
- local toFill = 2000 -- 2000 "abaixadas"
- local current = 0
- local update = function()
- current = current + 1
- local w = math.min(180, current * (200 / toFill))
- ui.addTextArea(0, "", nil, 5, 28, 180 , 15, 0x767676, 1, 1, true)
- ui.addTextArea(1, "", nil, 5, 28, w, 15, 0x00FFB1, 1, 1, true)
- if w == 200 then
- print("Venceu!")
- end
- end
- eventNewGame = function()
- for k, v in next, tfm.get.room.playerList do
- system.bindKeyboard(k, 3, true, true)
- end
- end
- eventKeyboard = function(n, k)
- if not tfm.get.room.playerList[n].isDead and k == 3 then
- update()
- end
- end
- -- Chuva temporal
- function eventLoop()
- for k = 250,50,-1 do
- tfm.exec.displayParticle(14,math.random(0,800),math.random(500),0,math.random(1.1),0,math.random(0.22))
- end
- end
- DEPOIS
- -- Preencher a tabela
- local toFill = 2000 -- 2000 "abaixadas"
- local current = 0
- local update = function()
- current = current + 1
- local w = math.min(180, current * (200 / toFill))
- ui.addTextArea(0, "", nil, 5, 28, 180 , 15, 0x767676, 1, 1, true)
- ui.addTextArea(1, "", nil, 5, 28, w, 15, 0x00FFB1, 1, 1, true)
- if w == 200 then
- print("Venceu!")
- end
- end
- eventNewGame = function()
- for k, v in next, tfm.get.room.playerList do
- system.bindKeyboard(k, 3, true, true)
- end
- end
- eventKeyboard = function(n, k)
- print(k)
- if not tfm.get.room.playerList[n].isDead and k == 3 then
- update()
- end
- end
- -- Chuva temporal
- function eventLoop()
- for k = 250,50,-1 do
- tfm.exec.displayParticle(14,math.random(0,800),math.random(500),0,math.random(1.1),0,math.random(0.22))
- end
- end
- tfm.exec.newGame(0)
- tfm.exec.disableAutoNewGame(true)
- APENAS ADICIONE
- tfm.exec.newGame(0)
- tfm.exec.disableAutoNewGame(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement