local M = {}

local flashInterval = 0.5  
local timeElapsed = 0       
local isFlashing = false     

local function updateGFX(dt)
    
    local currentSpeed = electrics.values.wheelspeed * 3.6

    timeElapsed = timeElapsed + dt

    if currentSpeed >= 120 then
        if timeElapsed >= flashInterval then
            isFlashing = not isFlashing  
            electrics.values.Lamp_120KM = isFlashing and 1 or 0  
            timeElapsed = 0  
        end
    else
        electrics.values.Lamp_120KM = 0
        isFlashing = false
        timeElapsed = 0  
    end
end

M.updateGFX = updateGFX

return M
