TweenBase
TweenBase : Instance
Overview
TweenService:Create() ํจ์์ ์ํด ์์ฑ๋ ํธ์ ๊ฐ์ฒด์ ๋ถ๋ชจ ํด๋์ค์ ๋๋ค.
Properties
PlaybackState
Enum.PlaybackState
ํธ์์ ํ์ฌ ์ํ์ ๋๋ค. (์ฝ๊ธฐ ์ ์ฉ)
Code Samples
print(Tween.PlaybackState)
Methods
Cancel
ํธ์์ ์ฌ์์ ์ค๋จํ๊ณ ๋ด๋ถ ์ํ๋ฅผ ์ด๊ธฐํํฉ๋๋ค.
ํธ์์ด ์ค๋จ๋๋๋ผ๋ ํธ์์ ์ํด ๋ณ๊ฒฝ๋ ์์ฑ ๊ฐ์ ์ด๊ธฐ๊ฐ์ผ๋ก ๋ณต๊ตฌ๋์ง ์์ต๋๋ค.
Parameters
Return
void
Code Samples
Tween:Cancel() -- Stop and reset the Tween
Pause
ํธ์์ ์ํ๊ฐ Playing์ผ ๋, ์ฌ์์ค์ธ ํธ์์ ์ผ์ ์ ์งํฉ๋๋ค. ์ด๋ ํธ์์ ์งํ ๋ฑ ๋ด๋ถ ์ํ๋ ์ด๊ธฐํ๋์ง ์์ผ๋ฏ๋ก, Play ํจ์๋ฅผ ๋ค์ ํธ์ถํ๋ฉด ์ ์ง๋ ์ง์ ๋ถํฐ ์ด์ด์ ์ฌ์๋ฉ๋๋ค.
Parameters
Return
void
Code Samples
Tween:Pause() -- Pause the animation
wait(1)
Tween:Play() -- Resume from the paused position
Play
ํธ์์ ์ฌ์์ ์์ํฉ๋๋ค.
์ด๋ฏธ ์ฌ์ ์ค์ธ ๊ฒฝ์ฐ Play ํจ์๋ฅผ ํธ์ถํด๋ ๋์ํ์ง ์์ผ๋ฉฐ, ์ฌ์์ด ์๋ฃ๋๊ฑฐ๋ Cancel ๋๋ Pause ํจ์๋ฅผ ํตํด ์ค์ง๋ ๊ฒฝ์ฐ, ์ด ํจ์๋ฅผ ํตํด ๋ค์ ์ฌ์์ํฌ ์ ์์ต๋๋ค.
๋์ผํ ๊ฐ์ฒด์ ๊ฐ๊ฐ ๋ค๋ฅธ ์์ฑ์ ํธ์์ ์ฌ๋ฌ๊ฐ ์ค์ ํ ๋ค์, ๋์์ ์คํํ๋ ๊ฒ์ ๊ฐ๋ฅํฉ๋๋ค. ํ์ง๋ง ๋ ๊ฐ์ ํธ์์ด ๋์ผํ ์์ฑ์ ๋ณ๊ฒฝํ๋ ค๊ณ ํ๋ฉด ๊ธฐ์กด ํธ์์ ์ทจ์๋๊ณ ์ต์ ํธ์๋ง ์คํ๋ฉ๋๋ค.
Parameters
Return
void
Code Samples
Tween:Play() -- Start or resume the animation
Events
Completed
ํธ์์ ์ฌ์์ด ์๋ฃ๋๊ฑฐ๋, Cancel๋ก ์ค๋จ๋๋ฉด ์คํ๋ฉ๋๋ค.
์ฐ๊ฒฐ๋ ํจ์์ ํธ์์ด ์ด๋ค ์ด์ ๋ก ์ข ๋ฃ๋์๋์ง ์ํ๋ฅผ ์ ๋ฌํฉ๋๋ค.
Parameters
Enum.PlaybackState
playbackState
Tween์ด ์ข ๋ฃ๋ ๋์ ์ํ
Code Samples
local function OnCompleted(playbackState)
print("Tween Complete!", playbackState)
end
Tween.Completed:Connect(OnCompleted)
See also
ํธ์Last updated