Tectoon

[TFM] Ônibus

Jun 25th, 2015
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. ---
  2. -- Bus Animation
  3. ---
  4.  
  5. bus={x=10,y=0,
  6.     color=0xFFD800,color2=0x333333,
  7.     --target='Transforlays',
  8.     wheel={
  9.         state=true,
  10.         text='<p align="center"><font color="#121212" size="44">',
  11.         text2='<font color="#dedede"><p align="center"><font size="70">•',
  12.         text3='<font color="#121212"><p align="center"><font size="100">•'}}
  13. function eventLoop()
  14.     ui.addTextArea(10,'',bus.target,bus.x+20,bus.y+50,300,100,bus.color,bus.color)
  15.     ui.addTextArea(20,'',bus.target,bus.x+270,bus.y+70,50,40,bus.color2,bus.color,0.7)
  16.     ui.addTextArea(32,bus.wheel.text3,bus.target,bus.x+32,bus.y+90,nil,nil,0)
  17.     ui.addTextArea(42,bus.wheel.text3,bus.target,bus.x+230,bus.y+90,nil,nil,0)
  18.     ui.addTextArea(31,bus.wheel.text2,bus.target,bus.x+40,bus.y+110,nil,nil,0)
  19.     ui.addTextArea(41,bus.wheel.text2,bus.target,bus.x+238,bus.y+110,nil,nil,0)
  20.     if bus.wheel.state then
  21.         ui.addTextArea(30,bus.wheel.text..'+',bus.target,bus.x+40,bus.y+129,nil,nil,0)
  22.         ui.addTextArea(40,bus.wheel.text..'+',bus.target,bus.x+240,bus.y+129,nil,nil,0)
  23.     else
  24.         ui.addTextArea(30,bus.wheel.text..'x',bus.target,bus.x+46,bus.y+127,nil,nil,0)
  25.         ui.addTextArea(40,bus.wheel.text..'x',bus.target,bus.x+244,bus.y+127,nil,nil,0)
  26.     end
  27.     ui.addTextArea(50,'',bus.target,bus.x+20,bus.y+120,300,1,bus.color2,bus.color)
  28.     tfm.exec.displayParticle(3,bus.x+5,bus.y+140,-1,-1,-0.1,0,bus.target)
  29.     for i=1,6 do
  30.         ui.addTextArea(50+i,'',bus.target,bus.x+25+((i-1)*40),bus.y+70,25,25,bus.color2,bus.color,0.5)
  31.     end
  32.     bus.x=bus.x+3
  33.     bus.wheel.state=not bus.wheel.state
  34. end
Advertisement
Add Comment
Please, Sign In to add comment