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