Jump to content

Duvida interpolateBetween


Recommended Posts

To fazendo um sistema que pra quando o player clica no botão o dxDrawRectangle cresce e se ele clicar de novo o Retângulo diminui até sumir, como posso fazer o mesmo? meu codigo: 

local screenW, screenH = guiGetScreenSize()
local x, y = (screenW/1366), (screenH/768)

local estado = false
cor = {}
scale = {}
tick = getTickCount()

function draw_Login()
	local between = interpolateBetween(0, 0, 0, x*600, 0, 0, ((getTickCount() - tick) / 2000), "SineCurve")
	scale[1] = 75
	scale[2] = 55
dxDrawRectangle(x*815, y*45, between/5, y*30, tocolor(100, 0, 0, 200), false)
end
  addEventHandler("onClientRender", root, draw_Login)

function Click( button, state )	
end
addEventHandler("onClientClick", getRootElement(),click)

 

Edited by MRXBBC
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...