루아 대기 기능

코드 예제

3
0

대기 기능 루아

function wait(seconds)
    local start = os.time()
    repeat until os.time() > start + seconds
end
--Exactly the same as the roblox one!
2
0

lua 에서 wait()

wait(5)  -- Waits 5 seconds then prints "Hello world!"
print("Hello world!")
2
0

수면 기능 루아

local clock = os.clock
function sleep(n)  -- seconds
  local t0 = clock()
  while clock() - t0 <= n do end
end
0
0

루아에서 기다리는 법

wait() --parameter is seconds
0
0

루아 대기 기능

local function wait(seconds)
    local time = seconds or 1
    local start = os.time()
    repeat until os.time() == start + time
end
0
0

루아를 기다리는 법

wait(1)

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................