Tween
Tween : TweenBase
Overview
ํธ์ ๊ฐ์ฒด๋ ์์ฑ ๊ฐ์ ์ผ์ ์๊ฐ ๋์ ์์ํ ๋ณํ์ํค๋ ์ ๋๋ฉ์ด์ ์ฐ์ถ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
ํ ๋ฒ ์ค์ ๋ ํธ์์ ๋ชฉํ ๊ฐ(goal)์ ์์ ํ ์ ์์ผ๋ฉฐ, ๊ฐ์ ์์ฑ์ ๋ํด ์ฌ๋ฌ ๊ฐ์ ํธ์์ ๋์์ ์ ์ฉํ ์ ์์ต๋๋ค. ๋ง์ฝ ๋์ผํ ์์ฑ์ ๋ณด๊ฐํ๋ ค๋ ํธ์์ด ์ฌ๋ฌ ๊ฐ ์กด์ฌํ ๊ฒฝ์ฐ, ๊ธฐ์กด ํธ์์ ์ทจ์๋๊ณ ๋ง์ง๋ง ํธ์์ด ์ฐ์ ์ ์ฉ๋ฉ๋๋ค.
Properties
Instance
Instance
ํธ์ ๊ฐ์ฒด์ ์ค์ ๋ Instance๋ฅผ ๊ฐ์ ธ์ต๋๋ค. (์ฝ๊ธฐ ์ ์ฉ)
Code Samples
print(Tween.Instance)
TweenInfo
TweenInfo
ํธ์ ๊ฐ์ฒด์ ์ค์ ๋ TweenInfo๋ฅผ ๊ฐ์ ธ์ต๋๋ค. (์ฝ๊ธฐ ์ ์ฉ)
Code Samples
local tweenInfo = Tween.TweenInfo
print(tweenInfo.Time)
print(tweenInfo.EasingStyle)
print(tweenInfo.EasingDirection)
print(tweenInfo.RepeatCount)
print(tweenInfo.Reverses)
print(tweenInfo.DelayTime)
Methods
Play
ํธ์์ ์ฌ์์ ์์ํฉ๋๋ค.
์ด๋ฏธ ์ฌ์ ์ค์ธ ๊ฒฝ์ฐ Play ํจ์๋ฅผ ํธ์ถํด๋ ๋์ํ์ง ์์ผ๋ฉฐ, ์ฌ์์ด ์๋ฃ๋๊ฑฐ๋ Cancel ๋๋ Pause ํจ์๋ฅผ ํตํด ์ค์ง๋ ๊ฒฝ์ฐ, ์ด ํจ์๋ฅผ ํตํด ๋ค์ ์ฌ์์ํฌ ์ ์์ต๋๋ค.
๋์ผํ ๊ฐ์ฒด์ ๊ฐ๊ฐ ๋ค๋ฅธ ์์ฑ์ ํธ์์ ์ฌ๋ฌ๊ฐ ์ค์ ํ ๋ค์, ๋์์ ์คํํ๋ ๊ฒ์ ๊ฐ๋ฅํฉ๋๋ค. ํ์ง๋ง ๋ ๊ฐ์ ํธ์์ด ๋์ผํ ์์ฑ์ ๋ณ๊ฒฝํ๋ ค๊ณ ํ๋ฉด ๊ธฐ์กด ํธ์์ ์ทจ์๋๊ณ ์ต์ ํธ์๋ง ์คํ๋ฉ๋๋ค.
Parameters
Return
void
Code Samples
Tween:Play()
Cancel
ํธ์์ ์ฌ์์ ์ค๋จํ๊ณ ๋ด๋ถ ์ํ๋ฅผ ์ด๊ธฐํํฉ๋๋ค.
ํธ์์ด ์ค๋จ๋๋๋ผ๋ ํธ์์ ์ํด ๋ณ๊ฒฝ๋ ์์ฑ ๊ฐ์ ์ด๊ธฐ๊ฐ์ผ๋ก ๋ณต๊ตฌ๋์ง ์์ต๋๋ค.
Parameters
Return
void
Code Samples
Tween:Cancel()
Pause
ํธ์์ ์ํ๊ฐ Playing์ผ ๋, ์ฌ์์ค์ธ ํธ์์ ์ผ์ ์ ์งํฉ๋๋ค. ์ด๋ ํธ์์ ์งํ ๋ฑ ๋ด๋ถ ์ํ๋ ์ด๊ธฐํ๋์ง ์์ผ๋ฏ๋ก, Play ํจ์๋ฅผ ๋ค์ ํธ์ถํ๋ฉด ์ ์ง๋ ์ง์ ๋ถํฐ ์ด์ด์ ์ฌ์๋ฉ๋๋ค.
Parameters
Return
void
Code Samples
Tween:Pause() -- Pause
wait(2)
Tween:Play() -- Resume
Events
See also
ํธ์Last updated