Track

νŠΈλž™ κ΄€λ ¨ μ œμ–΄λ₯Ό ν•˜λŠ” κ°μ²΄μ—μš”.

ν•¨μˆ˜

void AddLocalMove(string TrackName, Vector Pos, number Time, bool CheckCollision)

둜컬 μ’Œν‘œλ₯Ό κΈ°μ€€μœΌλ‘œ 이동 λ³€ν™”λ₯Ό μΆ”κ°€ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  Track 이름, 이동 λ³€ν™”λ₯Ό 쀄 κ°’, μ™„λ£ŒκΉŒμ§€ κ±Έλ¦¬λŠ” μ‹œκ°„, 좩돌 처리 μ—¬λΆ€)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local pos = Vector.new(0, 500, 0)
local moveSpeed = 2
local waitTime = 1

cube.Track:AddLocalMove("Move", Vector.new(pos.X, pos.Y, pos.Z), moveSpeed, false) --이동 νŠΈλž™μ„ λ“±λ‘ν•΄μš”. (이동 νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.)
cube.Track:AddEmpty("Move", waitTime) --λŒ€κΈ° νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddLocalMove("Move", Vector.new(-pos.X, -pos.Y, -pos.Z), moveSpeed, false)
cube.Track:AddEmpty("Move", waitTime)
cube.Track:PlayTransformTrack("Move", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void AddLocalRot(string TrackName, Vector Rot, number Time)

둜컬 μ’Œν‘œλ₯Ό κΈ°μ€€μœΌλ‘œ νšŒμ „ λ³€ν™”λ₯Ό μΆ”κ°€ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  Track 이름, νšŒμ „ λ³€ν™”λ₯Ό 쀄 κ°’, μ™„λ£ŒκΉŒμ§€ κ±Έλ¦¬λŠ” μ‹œκ°„)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local moveSpeed = 2

cube.Track:AddLocalRot("Rot", Vector.new(0, 0, 360), moveSpeed) --νšŒμ „ νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddLocalRot("Rot", Vector.new(0, 360, 0), moveSpeed) --νšŒμ „ νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.
cube.Track:PlayTransformTrack("Rot", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void AddLocalScale(string TrackName, Vector Scale, number Time)

둜컬 μ’Œν‘œλ₯Ό κΈ°μ€€μœΌλ‘œ μŠ€μΌ€μΌ λ³€ν™”λ₯Ό μΆ”κ°€ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  Track 이름, μŠ€μΌ€μΌ λ³€ν™”λ₯Ό 쀄 κ°’, μ™„λ£ŒκΉŒμ§€ κ±Έλ¦¬λŠ” μ‹œκ°„)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local moveSpeed = 2

cube.Track:AddLocalScale("Size", Vector.new(0.6, 0.6, 0.6), moveSpeed) --크기 νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddLocalScale("Size", Vector.new(-0.6, -0.6, -0.6), moveSpeed) --크기 νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.
cube.Track:PlayTransformTrack("Size", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void AddWorldMove(string TrackName, Vector Pos, number Time, bool CheckCollision)

μ›”λ“œ μ’Œν‘œλ₯Ό κΈ°μ€€μœΌλ‘œ 이동 λ³€ν™”λ₯Ό μΆ”κ°€ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  Track 이름, 이동 λ³€ν™”λ₯Ό 쀄 κ°’, μ™„λ£ŒκΉŒμ§€ κ±Έλ¦¬λŠ” μ‹œκ°„, 좩돌 처리 μ—¬λΆ€)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local pos = Vector.new(0, 500, 0)
local moveSpeed = 2
local waitTime = 1

cube.Track:AddWorldMove("Move", Vector.new(pos.X, pos.Y, pos.Z), moveSpeed, false) --이동 νŠΈλž™μ„ λ“±λ‘ν•΄μš”. (이동 νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.)
cube.Track:AddEmpty("Move", waitTime) --λŒ€κΈ° νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddWorldMove("Move", Vector.new(-pos.X, -pos.Y, -pos.Z), moveSpeed, false)
cube.Track:AddEmpty("Move", waitTime)
cube.Track:PlayTransformTrack("Move", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void AddWorldRot(string TrackName, Vector Rot, number Time)

μ›”λ“œ μ’Œν‘œλ₯Ό κΈ°μ€€μœΌλ‘œ νšŒμ „ λ³€ν™”λ₯Ό μΆ”κ°€ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  Track 이름, νšŒμ „ λ³€ν™”λ₯Ό 쀄 κ°’, μ™„λ£ŒκΉŒμ§€ κ±Έλ¦¬λŠ” μ‹œκ°„)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local moveSpeed = 2

cube.Track:AddWorldRot("Rot", Vector.new(0, 0, 360), moveSpeed) --νšŒμ „ νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddWorldRot("Rot", Vector.new(0, 360, 0), moveSpeed) --νšŒμ „ νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.
cube.Track:PlayTransformTrack("Rot", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void AddEmpty(string TrackName, number Time)

객체 λ³€ν™˜μ— λŒ€κΈ° μ‹œκ°„μ„ μΆ”κ°€ν•  수 μžˆμ–΄μš”. (μΆ”κ°€ν•  Track 이름, λŒ€κΈ° μ‹œκ°„)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local pos = Vector.new(0, 500, 0)
local moveSpeed = 2
local waitTime = 1

cube.Track:AddLocalMove("Move", Vector.new(pos.X, pos.Y, pos.Z), moveSpeed, false) --이동 νŠΈλž™μ„ λ“±λ‘ν•΄μš”. (이동 νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.)
cube.Track:AddEmpty("Move", waitTime) --λŒ€κΈ° νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddLocalMove("Move", Vector.new(-pos.X, -pos.Y, -pos.Z), moveSpeed, false)
cube.Track:AddEmpty("Move", waitTime)
cube.Track:PlayTransformTrack("Move", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void PlayTransformTrack(string TrackName, TransformPlayType Type, number PlayCount)

μ„€μ •λœ λ³€ν™˜ 컨트둀러λ₯Ό μ‹€ν–‰μ‹œμΌœμš”. (μ‹€ν–‰ν•  Track 이름, Enum.TransformPlayType.νƒ€μž… , μ‹€ν–‰ 횟수)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local pos = Vector.new(0, 500, 0)
local moveSpeed = 2
local waitTime = 1

cube.Track:AddLocalMove("Move", Vector.new(pos.X, pos.Y, pos.Z), moveSpeed, false) --이동 νŠΈλž™μ„ λ“±λ‘ν•΄μš”.
cube.Track:AddLocalMove("Move", Vector.new(0, 0, 0), waitTime, false) --이동 νŠΈλž™μ€ μ—¬λŸ¬κ°œλ„ 등둝할 수 μžˆμ–΄μš”.
cube.Track:AddLocalMove("Move", Vector.new(-pos.X, -pos.Y, -pos.Z), moveSpeed, false)
cube.Track:AddLocalMove("Move", Vector.new(0, 0, 0), waitTime, false)
cube.Track:PlayTransformTrack("Move", Enum.TransformPlayType.Repeat, InfinityPlay) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μž¬μƒν•΄μš”.

void StopTransformTrack(string TrackName)

λ³€ν™˜ 컨트둀러λ₯Ό μ •μ§€μ‹œμΌœμš”. (정지할 Track 이름)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
cube.Track:StopTransformTrack("Move") --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ λ©ˆμΆ°μš”.

void PauseTransformTrack(string TrackName)

λ³€ν™˜ 컨트둀러λ₯Ό μΌμ‹œ μ •μ§€μ‹œμΌœμš” (μΌμ‹œ 정지할 Track 이름)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
cube.Track:PauseTransformTrack("Move") --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μΌμ‹œμ •μ§€ν•΄μš”.

void ResumeTransformTrack(string TrackName)

λ³€ν™˜ 컨트둀러λ₯Ό λ‹€μ‹œ ν”Œλ ˆμ΄μ‹œμΌœμš”. (ν”Œλ ˆμ΄ν•  Track 이름)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
cube.Track:ResumeTransformTrack("Move") --이름에 ν•΄λ‹Ήν•˜λŠ” μΌμ‹œμ •μ§€λœ νŠΈλž™μ„ λ‹€μ‹œ μž¬μƒν•΄μš”.

bool IsPlayingTransformTrack(string TrackName)

ν•΄λ‹Ή TransformTrack이 ν”Œλ ˆμ΄ 쀑인지 확인할 수 μžˆμ–΄μš”. (확인할 Track 이름)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube

if cube.Track:IsPlayingTransformTrack("Move") == true then --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ΄ μž¬μƒμ€‘μ΄λ©΄ trueλ₯Ό λ°˜ν™˜ν•΄μš”.
    print("Track is Playing")
end

void ResetTransformTrack(string TrackName)

ν•΄λ‹Ή TransformTrack 이 적용되기 μ „μ˜ Transform으둜 λ¦¬μ…‹μ‹œμΌœμš”. (리셋할 Track 이름)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
cube.Track:ResetTransformTrack("Move") --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ΄ μ μš©λ˜κΈ°μ „μ˜ 트랜슀폼으둜 λ¦¬μ…‹ν•΄μš”. (νŠΈλž™μ΄ λ©ˆμΆ”μ§„ μ•Šμ•„μš”.)

void RemoveTransformTrack(string TrackName)

ν•΄λ‹Ή Track을 μ œκ±°ν•΄μš”. (μ œκ±°ν•  Track 이름)

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
cube.Track:RemoveTransformTrack("Move") --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ„ μ œκ±°ν•΄μš”.

void ResetTransform()

TransformTrack 이 적용되기 μ „μ˜ 졜초 Transform으둜 λ¦¬μ…‹μ‹œμΌœμš”.

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
cube.Track:ResetTransform() --μ μš©λ˜κΈ°μ „μ˜ 트랜슀폼으둜 λ¦¬μ…‹ν•΄μš”. (νŠΈλž™μ΄ λ©ˆμΆ”μ§„ μ•Šμ•„μš”.)

void SetEndEventTransformTrack(string TrackName, function TargetFunction)

TransformTrack 이 λλ‚˜λ©΄ λ“±λ‘ν•œ function 을 ν˜ΈμΆœν•©λ‹ˆλ‹€.

-- μƒ˜ν”Œ --

local cube = Workspace.Cube
local pos = Vector.new(200, 0, 0)
local moveSpeed = 2

cube.Track:AddLocalMove("Move", pos, moveSpeed, false)

local function EndMove()
    print("EndMove!")
end
cube.Track:SetEndEventTransformTrack("Move", EndMove) --이름에 ν•΄λ‹Ήν•˜λŠ” νŠΈλž™μ΄ λλ‚˜λ©΄ ν˜ΈμΆœλ˜λŠ” ν•¨μˆ˜λ₯Ό μ—°κ²°ν•΄μš”.

cube.Track:PlayTransformTrack("Move", Enum.TransformPlayType.Repeat, 1)

Last updated