Player

Player

๊ฒŒ์ž„์— ์ฐธ์—ฌํ•œ ํ”Œ๋ ˆ์ด์–ด ๊ฐ์ฒด์—์š”. ์ด ๊ธฐ๋Šฅ๋“ค์€ ์„œ๋ฒ„์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ด์š”.

ํ•จ์ˆ˜

Character GetCharacter()

ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

local character = player:GetCharacter() --ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๋ฅผ ๋ฐ˜ํ™˜ํ•ด์š”.

number GetPlayerID()

ํ”Œ๋ ˆ์ด์–ด์˜ ์•„์ด๋””๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

print(player:GetPlayerID()) --ํ”Œ๋ ˆ์ด์–ด์˜ ํ”Œ๋ ˆ์ด์–ด ์•„์ด๋””๋ฅผ ์ˆซ์ž๋กœ ๋ฐ˜ํ™˜ํ•ด์š”.

string GetPlayerNickName()

ํ”Œ๋ ˆ์ด์–ด์˜ ๋‹‰๋„ค์ž„์„ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

print(player:GetPlayerNickName()) --ํ”Œ๋ ˆ์ด์–ด์˜ ํ”Œ๋ ˆ์ด์–ด ๋‹‰๋„ค์ž„์„ ๋ฌธ์ž๋กœ ๋ฐ˜ํ™˜ํ•ด์š”.

string GetTeamName()

ํ”Œ๋ ˆ์ด์–ด๊ฐ€ ์†ํ•ด์žˆ๋Š” ํŒ€ ์ด๋ฆ„์„ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

print(player.Name .. " Team : " .. player:GetTeamName()) --ํŒ€ ์ด๋ฆ„์„ ๋ฐ˜ํ™˜ํ•ด์š”.

void KillCharacter()

ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ๋ฅผ ์ฃฝ๊ฒŒ ํ•˜๋Š” ํ•จ์ˆ˜์—์š”.

-- ์ƒ˜ํ”Œ --

player:KillCharacter() --ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๋ฅผ ์ฃฝ์—ฌ์š”.

void RespawnCharacter()

ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ๋ฅผ ๋ฆฌ์Šคํฐ ์‹œํ‚ค๋Š” ํ•จ์ˆ˜์—์š”.

-- ์ƒ˜ํ”Œ --

player:RespawnCharacter() --ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๋ฅผ ๋ฆฌ์Šคํฐํ•ด์š”.

void SetCheckPoint(SpawnPoint SpawnPointObject)

ํ”Œ๋ ˆ์ด์–ด์˜ ์ฒดํฌ ํฌ์ธํŠธ๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด์š” (์„ค์ •ํ•  ์Šคํฐ ํฌ์ธํŠธ ์˜ค๋ธŒ์ ํŠธ)

void SetCheckPoint(Object TargetObject)

ํ”Œ๋ ˆ์ด์–ด์˜ ์ฒดํฌ ํฌ์ธํŠธ๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด์š” (์„ค์ •ํ•  ์›”๋“œ ์˜ค๋ธŒ์ ํŠธ)

-- ์ƒ˜ํ”Œ --

local NewCheckPoint = Workspace.Cube
player:SetCheckPoint(NewCheckPoint)

SpawnPoint GetCheckPoint()

ํ”Œ๋ ˆ์ด์–ด์˜ ์ฒดํฌ ํฌ์ธํŠธ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

local playerCheckPoint = player:GetCheckPoint()
print(playerCheckPoint)

void RemoveCheckPoint()

์„ค์ •ํ•ด๋†“์€ ์ฒดํฌ ํฌ์ธํŠธ๋ฅผ ์ง€์›Œ์š”.

-- ์ƒ˜ํ”Œ --

player:RemoveCheckPoint()

void SetFreeCamMode(bool bFreeCam)

ํ”Œ๋ ˆ์ด์–ด์˜ ํ”„๋ฆฌ์บ  ๋ชจ๋“œ ์‚ฌ์šฉ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด์š”. (ํ”„๋ฆฌ์บ  ์‚ฌ์šฉ ์—ฌ๋ถ€)

-- ์ƒ˜ํ”Œ --

player:SetFreeCamMode(true)

bool GetFreeCamMode()

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด๊ฐ€ ํ”„๋ฆฌ์บ  ๋ชจ๋“œ ์ƒํƒœ์ธ์ง€ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

player:SetFreeCamMode(true)
local freeCamMode = player:GetFreeCamMode()
print(freeCamMode) -- true

void RequestFreeCam(number WaitTime)

์ง€์ •๋œ ์‹œ๊ฐ„์ด ์ง€๋‚œ ํ›„์— ํ”Œ๋ ˆ์ด์–ด์˜ ํ”„๋ฆฌ์บ  ๋ชจ๋“œ๋ฅผ ์š”์ฒญํ•ด์š”. (๋Œ€๊ธฐ ์‹œ๊ฐ„)

-- ์ƒ˜ํ”Œ --

player:RequestFreeCam(3) --3์ดˆํ›„ ํ”„๋ฆฌ์บ ์ด ์‹œ์ž‘๋ผ์š”.

bool GiveItem(Item ObjectItem)

ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ์•„์ดํ…œ์„ ์ค„ ์ˆ˜ ์žˆ์–ด์š”. (์ค„ ์•„์ดํ…œ) return ์„ฑ๊ณต, ์‹คํŒจ

-- ์ƒ˜ํ”Œ --

local item = Script.Parent

wait(2)
player:GiveItem(item) --ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ์•„์ดํ…œ์„ ์ง€๊ธ‰ํ•ด์š”.

bool GiveItem(Item ObjectItem, number Count)

ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ์•„์ดํ…œ์„ ์ค„ ์ˆ˜ ์žˆ์–ด์š”. (์ค„ ์•„์ดํ…œ, ๊ฐœ์ˆ˜) return ์„ฑ๊ณต, ์‹คํŒจ

-- ์ƒ˜ํ”Œ --

local item = Script.Parent
local count = 3

wait(2)
bool isSuccess = player:GiveItem(item, count) --ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ์•„์ดํ…œ์„ 3๊ฐœ ์ง€๊ธ‰ํ•ด์š”.

number GetInventorySize()

ํ”Œ๋ ˆ์ด์–ด์˜ ์ธ๋ฒคํ† ๋ฆฌ ์‚ฌ์ด์ฆˆ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

print(player:GetInventorySize()) --ํ”Œ๋ ˆ์ด์–ด์˜ ์ธ๋ฒคํ† ๋ฆฌ ์‚ฌ์ด์ฆˆ๋ฅผ ์ˆซ์ž๋กœ ๋ฐ˜ํ™˜ํ•ด์š”.

void DeleteItem(number index)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์ธ๋ฒคํ† ๋ฆฌ ์นธ์— ํ•ด๋‹น ์•„์ดํ…œ์„ ์‚ญ์ œํ•ด์š”. (์‚ญ์ œํ•˜๋ ค๋Š” ์นธ)

-- ์ƒ˜ํ”Œ --

player:DeleteItem(1)

void DeleteItem(number index, number count)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์ธ๋ฒคํ† ๋ฆฌ ์นธ์— ํ•ด๋‹น ์•„์ดํ…œ์„ ๊ฐฏ์ˆ˜๋งŒํผ ์‚ญ์ œํ•ด์š”. (์‚ญ์ œํ•˜๋ ค๋Š” ์นธ, ์‚ญ์ œ๊ฐฏ์ˆ˜)

-- ์ƒ˜ํ”Œ --

player:DeleteItem(1, 3)

void DeleteItem(Item TargetItem)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์ธ๋ฒคํ† ๋ฆฌ์—์„œ ํ•ด๋‹นํ•˜๋Š” ์•„์ดํ…œ์„ ์‚ญ์ œํ•ด์š”. (์‚ญ์ œํ•˜๋ ค๋Š” ์•„์ดํ…œ)

-- ์ƒ˜ํ”Œ --

player:DeleteItem(item)

void DeleteItem(Item TargetItem, number count)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์ธ๋ฒคํ† ๋ฆฌ์—์„œ ํ•ด๋‹นํ•˜๋Š” ์•„์ดํ…œ์„ ๊ฐฏ์ˆ˜๋งŒํผ ์‚ญ์ œํ•ด์š”. (์‚ญ์ œํ•˜๋ ค๋Š” ์•„์ดํ…œ, ์‚ญ์ œ๊ฐฏ์ˆ˜)

-- ์ƒ˜ํ”Œ --

player:DeleteItem(item, 3)

void ClearItem()

ํ”Œ๋ ˆ์ด์–ด์˜ ์•„์ดํ…œ์„ ๋ชจ๋‘ ์ œ๊ฑฐํ•ด์š”.

-- ์ƒ˜ํ”Œ --

player:ClearItem()

bool EquipInventoryItem(number InventoryIndex)

ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ์— ์•„์ดํ…œ์„ ์žฅ์ฐฉ์‹œํ‚ฌ ์ˆ˜ ์žˆ์–ด์š”. (์žฅ์ฐฉ ํ•  ์ธ๋ฒคํ† ๋ฆฌ ์นธ)

-- ์ƒ˜ํ”Œ --

local item = Script.Parent
local collider = Item.BoxCollider

local function GetItem(self, character)
    if not character:IsCharacter() then
        return
    end

    local player = character:GetPlayer()
    bool isSuccess = player:GiveItem(item) --ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ์•„์ดํ…œ์„ ์ง€๊ธ‰ํ•ด์š”.

    if isSuccess then
        local InvenItemList = Player:GetInventoryItemList()

        --ํ”Œ๋ ˆ์ด์–ด ์ธ๋ฒคํ† ๋ฆฌ์—์„œ ์ด๋ฆ„์œผ๋กœ ์•„์ดํ…œ์„ ์ฐพ์•„์š”.
        for slotIndex, slotItem in pairs(InvenItemList) do
            if slotItem.Name == item.Name then
                --ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ์— ์•„์ดํ…œ์„ ์žฅ์ฐฉ์‹œ์ผœ์š”.
                player:EquipInventoryItem(slotIndex)
                return
            end
        end
    end
end
collider.Collision.OnBeginOverlapEvent:Connect(GetItem)

void SwapInventoryItem(number InventoryIndex, number InventoryIndex_Other)

์ธ๋ฒคํ† ๋ฆฌ ์•ˆ์˜ ๋‘ ์•„์ดํ…œ ์œ„์น˜๋ฅผ ์„œ๋กœ ๋ฐ”๊ฟ”์š”.

void SetItemQuickSlot(number QuickSlotId, number InventoryIndex)

์•„์ดํ…œ์„ ํ€ต์Šฌ๋กฏ์— ๋“ฑ๋กํ•ด์š”.

void ReleaseItemQuickSlot(number QuickSlotId)

์•„์ดํ…œ์„ ํ€ต์Šฌ๋กฏ์—์„œ ํ•ด์ œํ•ด์š”.

void ClearQuickSlot()

ํ€ต์Šฌ๋กฏ์— ๋“ฑ๋ก๋œ ๋ชจ๋“  ์•„์ดํ…œ ํ•ด์ œํ•ด์š”.

void SwapItemQuickSlot(number QuickSlotId_A, number QuickSlotId_B)

ํ€ต์Šฌ๋กฏ์— ๋“ฑ๋ก๋œ ๋‘ ์•„์ดํ…œ์„ ์„œ๋กœ ๋ฐ”๊ฟ”์š”.

void UseItemQuickSlot(number QuickSlotId)

ํ€ต์Šฌ๋กฏ์— ๋“ฑ๋ก๋œ ์•„์ดํ…œ์„ ์‚ฌ์šฉํ•ด์š”.

Item GetItemQuickSlot(number QuickSlotId)

ํ€ต์Šฌ๋กฏ์— ๋“ฑ๋ก๋œ ์•„์ดํ…œ์„ ์–ป์–ด์š”.

void SetEnableCollisionBetweenCharacters(bool Enable)

ํ”Œ๋ ˆ์ด์–ด๊ฐ„์˜ ์ถฉ๋Œ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด์š”. (์ถฉ๋Œ ์—ฌ๋ถ€)

-- ์ƒ˜ํ”Œ --

player:SetEnableCollisionBetweenCharacters(false) --ํŠน์ • ํ”Œ๋ ˆ์ด์–ด๊ฐ€ ๋‹ค๋ฅธ ์บ๋ฆญํ„ฐ์™€ ์ถฉ๋Œ๋˜์ง€ ์•Š๊ฒŒ ์„ค์ •ํ•ด์š”.

void SetUserCollisionTypeResponse(string UserCollisionType, CollisionResponse Response)

์œ ์ €๊ฐ€ ์ถฉ๋Œ ์‹œ ๋ฐœ์ƒ ํƒ€์ž…์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด์š”. (์ถฉ๋Œ ํƒ€์ž… ์ด๋ฆ„ ์„ค์ •, Enum.CollisionResponse.ํƒ€์ž… )

-- ์ƒ˜ํ”Œ --

Game:AddUserCollisionType("CollisionTag1") --๊ฒŒ์ž„์— ์œ ์ € ์ถฉ๋Œ ํƒ€์ž…(CollisionTag1)์„ ์ถ”๊ฐ€ํ•ด์š”.

local cube1 = Workspace.Cube1
local cube2 = Workspace.Cube2

cube1.Collision:SetCollisionType("CollisionTag1") --๊ฐ์ฒดA์— ์ถฉ๋Œ ํƒ€์ž…(CollisionTag1)์„ ์„ค์ •ํ•ด์š”.

cube2.Collision:SetUserCollisionTypeResponse("CollisionTag1", Enum.CollisionResponse.Overlap) --๋˜ ๋‹ค๋ฅธ ๊ฐ์ฒดB์— ์ถฉ๋Œ ํƒ€์ž…(CollisionTag1)๋ณ„ ์ถฉ๋Œ ๋ฐ˜์‘์„ ์„ค์ •ํ•ด์š”.

bool HaveInventorySaveData()

์ €์žฅ์†Œ์— ์ธ๋ฒˆํ† ๋ฆฌ์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

print(player:HaveInventorySaveData()) --์ €์žฅ์†Œ์— ์ธ๋ฒˆํ† ๋ฆฌ์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋˜์–ด ์žˆ์œผ๋ฉด true๋ฅผ ๋ฐ˜ํ™˜ํ•ด์š”.

HitResult LineTrace(Vector Start, Vector Dir, number Distance)

(deprecated) ์„ค์ •๋œ ์‹œ์ž‘ ์ง€์ ์—์„œ ์›ํ•˜๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์ง€์ •๋œ ๊ฑฐ๋ฆฌ ๋งŒํผ ์ถฉ๋Œ์ด ์žˆ๋Š”์ง€ ์ฒดํฌํ•  ์ˆ˜ ์žˆ์–ด์š”. (์‹œ์ž‘ ์ง€์  Vector, ๋ฐฉํ–ฅ Vector, ๊ฑฐ๋ฆฌ ๊ฐ’) ์‚ฌ์šฉํ•˜๋Š” player๋Š” ์ฒดํฌ์—์„œ ์ œ์™ธ๋ฉ๋‹ˆ๋‹ค.

HitResult LineTrace(Vector Start, Vector Dir, number Distance, string UserCollisionTypeName)

(deprecated) ์„ค์ •๋œ ์‹œ์ž‘ ์ง€์ ์—์„œ ์›ํ•˜๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์ง€์ •๋œ ๊ฑฐ๋ฆฌ ๋งŒํผ ์œ ์ €๊ฐ€ ์ถ”๊ฐ€ํ•œ ์ถฉ๋Œ ํƒ€์ž…๊ณผ์˜ ์ถฉ๋Œ์ด ์žˆ๋Š”์ง€ ์ฒดํฌํ•  ์ˆ˜ ์žˆ์–ด์š”. (์‹œ์ž‘ ์ง€์  Vector, ๋ฐฉํ–ฅ Vector, ๊ฑฐ๋ฆฌ ๊ฐ’, ์›ํ•˜๋Š” ์œ ์ € ์ถฉ๋Œ ํƒ€์ž… ์ด๋ฆ„) ์‚ฌ์šฉํ•˜๋Š” player๋Š” ์ฒดํฌ์—์„œ ์ œ์™ธ๋ฉ๋‹ˆ๋‹ค.

HitResult LineTraceList(Vector Dir, number Distance)

์„ค์ •๋œ ์‹œ์ž‘ ์ง€์ ์—์„œ ์›ํ•˜๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์ง€์ •๋œ ๊ฑฐ๋ฆฌ ๋งŒํผ ์ถฉ๋Œ์ด ์žˆ๋Š”์ง€ ์ฒดํฌํ•  ์ˆ˜ ์žˆ์–ด์š”. (์‹œ์ž‘ ์ง€์  Vector, ๋ฐฉํ–ฅ Vector, ๊ฑฐ๋ฆฌ ๊ฐ’) ์‚ฌ์šฉํ•˜๋Š” player๋Š” ์ฒดํฌ์—์„œ ์ œ์™ธ๋ฉ๋‹ˆ๋‹ค.

HitResult LineTraceList(Vector Dir, number Distance, string UserCollisionTypeName)

์„ค์ •๋œ ์‹œ์ž‘ ์ง€์ ์—์„œ ์›ํ•˜๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์ง€์ •๋œ ๊ฑฐ๋ฆฌ ๋งŒํผ ์œ ์ €๊ฐ€ ์ถ”๊ฐ€ํ•œ ์ถฉ๋Œ ํƒ€์ž…๊ณผ์˜ ์ถฉ๋Œ์ด ์žˆ๋Š”์ง€ ์ฒดํฌํ•  ์ˆ˜ ์žˆ์–ด์š”. (์‹œ์ž‘ ์ง€์  Vector, ๋ฐฉํ–ฅ Vector, ๊ฑฐ๋ฆฌ ๊ฐ’, ์›ํ•˜๋Š” ์œ ์ € ์ถฉ๋Œ ํƒ€์ž… ์ด๋ฆ„) ์‚ฌ์šฉํ•˜๋Š” player๋Š” ์ฒดํฌ์—์„œ ์ œ์™ธ๋ฉ๋‹ˆ๋‹ค.

-- ์ƒ˜ํ”Œ --

local startPos = Workspace.Cube.Transform.Location
local dir = Vector.new(1, 0, 0)
local distance = 1000

local target = player:LineTrace(startPos, dir, distance) --์‹œ์ž‘ ์œ„์น˜์—์„œ ์ง€์ • ๋ฐฉํ–ฅ์˜ ๊ฑฐ๋ฆฌ์— ์ถฉ๋Œ์ฒด๊ฐ€ ์žˆ์œผ๋ฉด ์ถฉ๋Œ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•ด์š”.

print(target.HitObject.Name) --์ถฉ๋Œํ•œ ์˜ค๋ธŒ์ ํŠธ์—์š”.
print(target.HitLocation) --์ถฉ๋Œํ•œ ์˜ค๋ธŒ์ ํŠธ์˜ ์œ„์น˜์—์š”.

ItemObject GetInventoryItem(number InventoryIndex)

์ง€์ •๋œ ์นธ์˜ ์ธ๋ฒคํ† ๋ฆฌ ์•„์ดํ…œ์„ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”. (์ธ๋ฒคํ† ๋ฆฌ ์นธ)

-- ์ƒ˜ํ”Œ --

if player:GetInventoryItem(1) ~= nil then
    print(player:GetInventoryItem(1).Name) --์ง€์ •๋œ ์นธ์˜ ์ธ๋ฒคํ† ๋ฆฌ ์•„์ดํ…œ์„ ๋ฐ˜ํ™˜ํ•ด์š”.
end

Table GetInventoryItemList()

์ธ๋ฒคํ† ๋ฆฌ ์•ˆ์˜ ๋ชจ๋“  ์•„์ดํ…œ์„ ์–ป์–ด์š”. ๊ฒฐ๊ณผ๊ฐ’์€ ์Šฌ๋กฏ ์ธ๋ฑ์Šค์™€ ํ•ด๋‹น ์Šฌ๋กฏ์˜ ์•„์ดํ…œ์„ ์Œ์œผ๋กœ ํ•˜๋Š” ํ…Œ์ด๋ธ”์ด์—์š”.

-- ์ƒ˜ํ”Œ --

local InvenItemList = Player:GetInventoryItemList()

for slotIndex, slotItem in pairs(InvenItemList) do
		print(slotIndex .. " " .. slotItem.Name)
end

Item GetEquipItem(string EquipSlot)

ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ๊ฐ€ ์ฐฉ์šฉ์ค‘์ธ ์•„์ดํ…œ์„ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”. (์žฅ์ฐฉ ์ค‘์ธ ์•„์ดํ…œ ์Šฌ๋กฏ)

-- ์ƒ˜ํ”Œ --

if player:GetEquipItem("EquipSlot_1") ~= nil then
    print(player:GetEquipItem("EquipSlot_1").Name) --ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ๊ฐ€ ์ฐฉ์šฉ์ค‘์ธ ์•„์ดํ…œ์„ ๋ฐ˜ํ™˜ํ•ด์š”.
end

void AddSaveValue(string ValueName, Vector Data, ReplicateType Type, number Time)

ํ•ด๋‹น ์œ ์ €์˜ ์ €์žฅ๋˜๋Š” ๋ฒกํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (Value ์ด๋ฆ„, Vector ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

void AddSaveValue(string ValueName, number Data, ReplicateType Type, number Time)

ํ•ด๋‹น ์œ ์ €์˜ ์ €์žฅ๋˜๋Š” ์‹ค์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (Value ์ด๋ฆ„, number ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

void AddSaveValue(string ValueName, bool Data, ReplicateType Type, number Time)

ํ•ด๋‹น ์œ ์ €์˜ ์ €์žฅ๋˜๋Š” bool์„ ์ถ”๊ฐ€ํ•ด์š”. (Value ์ด๋ฆ„, bool ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

void AddSaveValue(string ValueName, string Data, ReplicateType Type, number Time)

ํ•ด๋‹น ์œ ์ €์˜ ์ €์žฅ๋˜๋Š” ๋ฌธ์ž์—ด์„ ์ถ”๊ฐ€ํ•ด์š”. (Value ์ด๋ฆ„, string ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

void AddSaveValue(string ValueName, Color Data, ReplicateType Type, number Time)

ํ•ด๋‹น ์œ ์ €์˜ ์ €์žฅ๋˜๋Š” ์ปฌ๋Ÿฌ๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (Value ์ด๋ฆ„, Color ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

void AddLandTransferData(string ValueName, Vector Value)

void AddLandTransferData(string ValueName, Double Value)

void AddLandTransferData(string ValueName, Bool Value)

void AddLandTransferData(string ValueName, string Value)

void AddLandTransferData(string ValueName, Color Value)

๋žœ๋“œ ์ด๋™์‹œ ๋‹ค๋ฅธ ๋žœ๋“œ๋กœ ์ „๋‹ฌํ•  ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์–ด์š”. ๋ณดํ†ต AddTeleportStartEvent์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•ด์š”

-- ์ƒ˜ํ”Œ --

local LandOrder1 = 1
local function StartTeleport_Land1(player)
    --ํ…”๋ ˆํฌํŠธํ•  ๋žœ๋“œ์—์„œ ์‚ฌ์šฉํ•  ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•ด์š”.
	player:AddLandTransferData("LevelData1", 124)
	player:AddLandTransferData("PartyName", "DeathParty")
end
Game:AddTeleportStartEvent(LandOrder1, StartTeleport_Land1) --ํ”Œ๋ ˆ์ด์–ด๊ฐ€ ํŠน์ • ๋žœ๋“œ๋กœ ํ…”๋ ˆํฌํŠธ ์ด๋™์„ ์‹œ์ž‘ํ• ๋•Œ ํ˜ธ์ถœ๋˜๋Š” ํ•จ์ˆ˜๋ฅผ ์—ฐ๊ฒฐํ•ด์š”.

local LandOrder2 = 3
local function StartTeleport_Land2(player)
    --ํ…”๋ ˆํฌํŠธํ•  ๋žœ๋“œ์—์„œ ์‚ฌ์šฉํ•  ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•ด์š”.
	player:AddLandTransferData("LevelData2", 555)
	player:AddLandTransferData("PartyName", "FriendParty")
end
Game:AddTeleportStartEvent(LandOrder2, StartTeleport_Land2) --ํ”Œ๋ ˆ์ด์–ด๊ฐ€ ํŠน์ • ๋žœ๋“œ๋กœ ํ…”๋ ˆํฌํŠธ ์ด๋™์„ ์‹œ์ž‘ํ• ๋•Œ ํ˜ธ์ถœ๋˜๋Š” ํ•จ์ˆ˜๋ฅผ ์—ฐ๊ฒฐํ•ด์š”.

Vector GetLandTransferData(Vector ValueName)

Double GetLandTransferData(Double ValueName)

Bool GetLandTransferData(Bool ValueName)

string GetLandTransferData(string ValueName)

Color GetLandTransferData(Color ValueName)

์ด์ „ ๋žœ๋“œ์—์„œ ์„ค์ •ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

player:GetLandTransferData("LevelData")	--์ด์ „ ๋žœ๋“œ์—์„œ ์„ค์ •ํ•œ ๊ฐ’์„ ๊ฐ€์ ธ์™€์š”.
player:GetLandTransferData("PartyName")	--์ด์ „ ๋žœ๋“œ์—์„œ ์„ค์ •ํ•œ ๊ฐ’์„ ๊ฐ€์ ธ์™€์š”.

void SetUsingCharacterSetting(CharacterSetting CharacterSettingObject)

(deprecated) ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…)

void SetUsingCharacterSetting(CharacterSetting CharacterSettingObject, bool bUseMyBody)

(deprecated) ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…, ์บ๋ฆญํ„ฐ ์ฒดํ˜•์„ ์ž์‹ ์˜ ์บ๋ฆญํ„ฐ ์ฒดํ˜•์œผ๋กœ ์‚ฌ์šฉํ• ์ง€ ์—ฌ๋ถ€)

void ChangeCharacterSetting(CharacterSetting CharacterSettingObject)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…) Game:SetUsingCharacterSetting ๊ณผ ๋‹ฌ๋ฆฌ ์ฆ‰์‹œ ๋ฐ˜์˜๋ผ์š”.

-- ์ƒ˜ํ”Œ --

local NewCharacterSetting = Workspace.NewCharacterSetting
player:ChangeCharacterSetting(NewCharacterSetting) --ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๊ฐ€ ๋ฐ”๋กœ ๋ณ€๊ฒฝ๋ผ์š”

void ChangeCharacterSetting(CharacterSetting CharacterSettingObject, bool bUseMyBody)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…, ์บ๋ฆญํ„ฐ ์ฒดํ˜•์„ ์ž์‹ ์˜ ์บ๋ฆญํ„ฐ ์ฒดํ˜•์œผ๋กœ ์‚ฌ์šฉํ• ์ง€ ์—ฌ๋ถ€) Game:SetUsingCharacterSetting ๊ณผ ๋‹ฌ๋ฆฌ ์ฆ‰์‹œ ๋ฐ˜์˜๋ผ์š”.

-- ์ƒ˜ํ”Œ --

local NewCharacterSetting = Workspace.NewCharacterSetting
player:ChangeCharacterSetting(NewCharacterSetting, false) --ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๊ฐ€ ๋ฐ”๋กœ ๋ณ€๊ฒฝ๋ผ์š”

CharacterSetting GetUsingCharacterSetting()

(deprecated) ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์‚ฌ์šฉ์ค‘์ธ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์š”.

void ChangeCharacterBaseSetting(CharacterBaseSetting BaseSettingObject)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…)

-- ์ƒ˜ํ”Œ --

local BaseSettingObject = Toybox.FPSCharacterSetting.BaseSettingObject
player:ChangeCharacterBaseSetting(BaseSettingObject) --ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๊ฐ€ ๋ฐ”๋กœ ๋ณ€๊ฒฝ๋ผ์š”

void ChangeCharacterAppearanceSetting(CharacterAppearanceSetting AppearanceSettingObject)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…)

-- ์ƒ˜ํ”Œ --

local AppearanceSetting = Toybox.FPSCharacterSetting.AppearanceSetting
player:ChangeCharacterAppearanceSetting(AppearanceSetting) --ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๊ฐ€ ๋ฐ”๋กœ ๋ณ€๊ฒฝ๋ผ์š”

void ChangeCharacterAnimationSetting(CharacterAnimationSetting AnimationSettingObject)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์„ค์ •ํ•ด์š”. (์„ค์ •ํ•  ์บ๋ฆญํ„ฐ ์„ธํŒ…)

-- ์ƒ˜ํ”Œ --

local AnimationSetting = Toybox.FPSCharacterSetting.AnimationSetting
player:ChangeCharacterAnimationSetting(AnimationSetting) --ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์บ๋ฆญํ„ฐ๊ฐ€ ๋ฐ”๋กœ ๋ณ€๊ฒฝ๋ผ์š”

void StoreCurrentCharacterSetting()

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ํ˜„์žฌ ์บ๋ฆญํ„ฐ ์„ธํŒ…์„ ์ €์žฅํ•ด์š”.

void RestorePreviousCharacterSetting()

StoreCurrentCharacterSetting ํ•จ์ˆ˜๋กœ ์ €์žฅํ–ˆ๋˜ ์„ธํŒ…์œผ๋กœ ๋˜๋Œ์•„ ๊ฐ‘๋‹ˆ๋‹ค.

void StoreCurrentCharacterBaseSetting()

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ํ˜„์žฌ ์บ๋ฆญํ„ฐ Base ์„ธํŒ…์„ ์ €์žฅํ•ด์š”.

void RestorePreviousCharacterBaseSetting()

StoreCurrentCharacterBaseSetting ํ•จ์ˆ˜๋กœ ์ €์žฅํ–ˆ๋˜ ์„ธํŒ…์œผ๋กœ ๋˜๋Œ์•„ ๊ฐ‘๋‹ˆ๋‹ค.

void StoreCurrentCharacterAppearanceSetting()

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ํ˜„์žฌ ์บ๋ฆญํ„ฐ Appearance ์„ธํŒ…์„ ์ €์žฅํ•ด์š”.

void RestorePreviousCharacterAppearanceSetting()

StoreCurrentCharacterAppearanceSetting ํ•จ์ˆ˜๋กœ ์ €์žฅํ–ˆ๋˜ ์„ธํŒ…์œผ๋กœ ๋˜๋Œ์•„ ๊ฐ‘๋‹ˆ๋‹ค.

void StoreCurrentCharacterAnimationSetting()

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ํ˜„์žฌ ์บ๋ฆญํ„ฐAnimation ์„ธํŒ…์„ ์ €์žฅํ•ด์š”.

void RestorePreviousCharacterAnimationSetting()

StoreCurrentCharacterAnimationSetting ํ•จ์ˆ˜๋กœ ์ €์žฅํ–ˆ๋˜ ์„ธํŒ…์œผ๋กœ ๋˜๋Œ์•„ ๊ฐ‘๋‹ˆ๋‹ค.

EventKeyReturnData AddEventKey(string EventName, function Function)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด๋ฅผ ํ•ด๋‹นํ•˜๋Š” ์ด๋ฆ„์˜ ์ด๋ฒคํŠธ์— ๋“ฑ๋ก์‹œ์ผœ์š”. (์ด๋ฒคํŠธ ์ด๋ฆ„, ์ด๋ฒคํŠธ ๋“ฑ๋ก ํ›„ ๋ฐ˜ํ™˜๊ฐ’์„ ๋ฐ›์„ ํ•จ์ˆ˜)

-- ์ƒ˜ํ”Œ --

local function DoEventKey(player, eventKeyReturnData)
    wait(1)

    local state = eventKeyReturnData.State --์ด๋ฒคํŠธํ‚ค์˜ ์ƒํƒœ
    local maxCount = eventKeyReturnData.MaxCount --์ด๋ฒคํŠธํ‚ค์˜ ์ตœ๋Œ€ ์ธ์›
    local useCount = eventKeyReturnData.UseCount --์ด๋ฒคํŠธํ‚ค์˜ ์ฐธ์—ฌ์ž ์ˆ˜
    local result = eventKeyReturnData.Result --์ด๋ฒคํŠธํ‚ค ๋“ฑ๋ก ๊ฒฐ๊ณผ

	--์ด๋ฒคํŠธํ‚ค ์ƒํƒœ ๋ฐ ๋“ฑ๋ก ์ˆ˜
	if state == Enum.EventKeyState.Wait then
		print("์ด๋ฒคํŠธํ‚ค ์ƒํƒœ : ๋Œ€๊ธฐ")
	elseif state == Enum.EventKeyState.Doing then
		print("์ด๋ฒคํŠธํ‚ค ์ƒํƒœ : ์ง„ํ–‰")
	elseif state == Enum.EventKeyState.Stop then
		print("์ด๋ฒคํŠธํ‚ค ์ƒํƒœ : ์ค‘์ง€")
	elseif state == Enum.EventKeyState.End then
		print("์ด๋ฒคํŠธํ‚ค ์ƒํƒœ : ์ข…๋ฃŒ")
	end
	print("์ด๋ฒคํŠธํ‚ค ๋“ฑ๋ก ์ˆ˜ : ", useCount, " / ", maxCount)

    --์ด๋ฒคํŠธํ‚ค ๋“ฑ๋ก ๊ฒฐ๊ณผ๊ฐ€ Success์ด๋ฉด
    if result == Enum.EventKeyResult.Success then
        print("์ด๋ฒคํŠธํ‚ค๋ฅผ ๋“ฑ๋กํ–ˆ์Šต๋‹ˆ๋‹ค!")

    --์ด๋ฒคํŠธํ‚ค ์‚ฌ์šฉ ๊ฒฐ๊ณผ๊ฐ€ Exist์ด๋ฉด
    elseif result == Enum.EventKeyResult.Exist then
        print("์ด๋ฏธ ๋“ฑ๋กํ•œ ์ด๋ฒคํŠธํ‚ค์ž…๋‹ˆ๋‹ค!")

    --์ด์™ธ์—๋Š”
    else
        print("์œ ํšจํ•˜์ง€ ์•Š์€ ์ด๋ฒคํŠธํ‚ค์ž…๋‹ˆ๋‹ค!")
    end
end

--์ด๋ฒคํŠธํ‚ค์— ํ”Œ๋ ˆ์ด์–ด๋ฅผ ๋“ฑ๋ก ์ฒ˜๋ฆฌํ•ด์š”.
--(์ด๋ฒคํŠธํ‚ค ์ด๋ฆ„, ์ด๋ฒคํŠธํ‚ค ๋“ฑ๋ก ์ฒ˜๋ฆฌ ํ•จ์ˆ˜)
player:AddEventKey("EventKeyName", DoEventKey)

CouponReturnData UseCoupon(string CouponType, function Function)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ํ•ด๋‹นํ•˜๋Š” ์ฟ ํฐ์„ ์‚ฌ์šฉํ•ด์š”. (์ฟ ํฐ ํƒ€์ž…์ด๋ฆ„, ์ด๋ฒคํŠธ ๋“ฑ๋ก ํ›„ ๋ฐ˜ํ™˜๊ฐ’์„ ๋ฐ›์„ ํ•จ์ˆ˜)

-- ์ƒ˜ํ”Œ --

local function DoUseCoupon(player, couponReturnData)
	local state = couponReturnData.State --์ฟ ํฐ์˜ ์ƒํƒœ
    local couponType = couponReturnData.CouponType --์ฟ ํฐ์˜ ๋ณด์ƒ ์ข…๋ฅ˜
    local result = couponReturnData.Result --์ฟ ํฐ ์‚ฌ์šฉ ๊ฒฐ๊ณผ

    --์ฟ ํฐ ์ƒํƒœ ๋ฐ ๋ณด์ƒ
    if state == Enum.CouponState.Wait then
        print("์ฟ ํฐ ์ƒํƒœ : ๋Œ€๊ธฐ")
    elseif state == Enum.CouponState.Doing then
        print("์ฟ ํฐ ์ƒํƒœ : ์ง„ํ–‰")
    elseif state == Enum.CouponState.Stop then
        print("์ฟ ํฐ ์ƒํƒœ : ์ค‘์ง€")
    elseif state == Enum.CouponState.End then
        print("์ฟ ํฐ ์ƒํƒœ : ์ข…๋ฃŒ")
    end
    print("์ฟ ํฐ ๋ณด์ƒ ํƒ€์ž… : ", couponType)

    --์ฟ ํฐ ์‚ฌ์šฉ ๊ฒฐ๊ณผ๊ฐ€ Success์ด๋ฉด
    if result == Enum.CouponResult.Success then
        print("์ฟ ํฐ์„ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค!")

        if couponType == "Gold" then
            player.Gold = player.Gold + 1000
        end

    --์ฟ ํฐ ์‚ฌ์šฉ ๊ฒฐ๊ณผ๊ฐ€ Exist์ด๋ฉด
    elseif result == Enum.CouponResult.Exist then
        print("์ด๋ฏธ ์‚ฌ์šฉํ•œ ์ฟ ํฐ์ž…๋‹ˆ๋‹ค!")

    --์ด์™ธ์—๋Š”
    else
        print("์œ ํšจํ•˜์ง€ ์•Š์€ ์ฟ ํฐ์ž…๋‹ˆ๋‹ค!")
    end
end

--ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ํ•ด๋‹น ์ฟ ํฐ์„ ์‚ฌ์šฉ ์ฒ˜๋ฆฌํ•ด์š”.
--(์ฟ ํฐ ๋ฒˆํ˜ธ, ์ฟ ํฐ ์‚ฌ์šฉ ์ฒ˜๋ฆฌ ํ•จ์ˆ˜)
player:UseCoupon("CouponNumber", DoUseCoupon)

void UseRemainCoupon(string CouponType, function Function)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ๋ฏธ์‚ฌ์šฉ ์ฟ ํฐ์„ ์‚ฌ์šฉํ•ด์š”. (์ฟ ํฐ ํƒ€์ž…์ด๋ฆ„, ์ด๋ฒคํŠธ ๋“ฑ๋ก ํ›„ ๋ฐ˜ํ™˜๊ฐ’์„ ๋ฐ›์„ ํ•จ์ˆ˜) ์—ฐ๊ฒฐ๋œ ํ•จ์ˆ˜๋กœ player, CouponData ๊ฐ€ ์ „๋‹ฌ๋˜์š”.

-- ์ƒ˜ํ”Œ --

local function DoUseRemainCoupon(player, couponReturnData)
    local state = couponReturnData.State --์ฟ ํฐ์˜ ์ƒํƒœ
    local couponType = couponReturnData.CouponType --์ฟ ํฐ์˜ ๋ณด์ƒ ์ข…๋ฅ˜
    local result = couponReturnData.Result --์ฟ ํฐ ์‚ฌ์šฉ ๊ฒฐ๊ณผ

    --์ฟ ํฐ ์ƒํƒœ ๋ฐ ๋ณด์ƒ
    if state == Enum.CouponState.Wait then
        print("์ฟ ํฐ ์ƒํƒœ : ๋Œ€๊ธฐ")
    elseif state == Enum.CouponState.Doing then
        print("์ฟ ํฐ ์ƒํƒœ : ์ง„ํ–‰")
    elseif state == Enum.CouponState.Stop then
        print("์ฟ ํฐ ์ƒํƒœ : ์ค‘์ง€")
    elseif state == Enum.CouponState.End then
        print("์ฟ ํฐ ์ƒํƒœ : ์ข…๋ฃŒ")
    end
    print("์ฟ ํฐ ๋ณด์ƒ ํƒ€์ž… : ", couponType)

    --์ฟ ํฐ ์‚ฌ์šฉ ๊ฒฐ๊ณผ๊ฐ€ Success์ด๋ฉด
    if result == Enum.CouponResult.Success then
        print("์ฟ ํฐ์„ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค!")

        if couponType == "Gold" then
            player.Gold = player.Gold + 1000
        end

    --์ฟ ํฐ ์‚ฌ์šฉ ๊ฒฐ๊ณผ๊ฐ€ Exist์ด๋ฉด
    elseif result == Enum.CouponResult.Exist then
        print("์ด๋ฏธ ์‚ฌ์šฉํ•œ ์ฟ ํฐ์ž…๋‹ˆ๋‹ค!")

    --์ด์™ธ์—๋Š”
    else
        print("์œ ํšจํ•˜์ง€ ์•Š์€ ์ฟ ํฐ์ž…๋‹ˆ๋‹ค!")
    end
end

-- ๋‚จ์€ ์ฟ ํฐ ์‚ฌ์šฉ
player:UseRemainCoupon(couponName, DoUseRemainCoupon)

void DoGetRemainCouponCount(string CouponType, function Function)

ํ•ด๋‹น ํ”Œ๋ ˆ์ด์–ด์˜ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ฟ ํฐ ์ˆ˜๋Ÿ‰์„ ์–ป์–ด์˜ฌ ์ˆ˜ ์žˆ์–ด์š”. ์—ฐ๊ฒฐ๋œ ํ•จ์ˆ˜๋กœ player, number count ๊ฐ€ ์ „๋‹ฌ๋˜์š”

-- ์ƒ˜ํ”Œ --

local function DoGetRemainCouponCount(player, count)
    print("Remain Coupon Count : ", count)
end

-- ์ฟ ํฐ ๋‚จ์€ ์ˆ˜๋Ÿ‰ ํ™•์ธ
player:GetRemainCouponCount(couponName, DoGetRemainCouponCount)

์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ถ€๋ชจ ์˜ค๋ธŒ์ ํŠธ ๊ธฐ๋Šฅ๋“ค

์†์„ฑ

์ด๋ฆ„

์„ค๋ช…

๋ถ€๋ชจ ๊ฐ์ฒด๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

๊ฐ์ฒด์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.

์ด๋ฒคํŠธ

์ด๋ฆ„

์„ค๋ช…

ํ•จ์ˆ˜

์ด๋ฆ„

์„ค๋ช…

์ถ”๊ฐ€๋œ ๊ฐ’์ด ๋ณ€๊ฒฝ ๋  ๋•Œ ํ˜ธ์ถœ๋˜๋Š” ์ด๋ฒคํŠธ์—์š”. (Value ์ด๋ฆ„, ์—ฐ๊ฒฐ ํ•จ์ˆ˜)

์ด๋ฆ„์œผ๋กœ ์ž์‹ ๊ฐ์ฒด๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”. (์ฐพ๊ณ ์‹ถ์€ ์ž์‹ ๊ฐ์ฒด ์ด๋ฆ„)

์ž์‹ ๊ฐ์ฒด์˜ ๋ฆฌ์ŠคํŠธ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

์บ๋ฆญํ„ฐ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

์Šคํ…Œํ‹ฑ ๋ฉ”์‹œ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

FX์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

Sound์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

ํฌ์ธํŠธ ๋ผ์ดํŠธ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

์ŠคํฌํŠธ ๋ผ์ดํŠธ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

์„œํ”ผ์Šค UI์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

์Šคํฌ๋ฆฐ UI์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

ํ„ฐ์น˜ UI์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

์•„์ดํ…œ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

NPC์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

์ŠคํŠธ๋ฆฝํŠธ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

Collider์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

Widget์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

Camera์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

ํ•ด๋‹น ์˜ค๋ธŒ์ ํŠธ๊ฐ€ ์œ ํšจํ•œ์ง€ ํ™•์ธ ํ•  ์ˆ˜์žˆ์–ด์š”.

ํ•ด๋‹น ์˜ค๋ธŒ์ ํŠธ์˜ ๊ฐ’์ด ์œ ํšจํ•œ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

ํ•ด๋‹น ๊ฐ์ฒด์— ์„œ๋ฒ„, ํด๋ผ์ด์–ธํŠธ ๊ฐ„ ๋™๊ธฐํ™”๊ฐ€ ๊ฐ€๋Šฅํ•œ ๋ฒกํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (์ถ”๊ฐ€ํ•  Value ์ด๋ฆ„, Vector ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

ํ•ด๋‹น ๊ฐ์ฒด์— ์„œ๋ฒ„, ํด๋ผ์ด์–ธํŠธ ๊ฐ„ ๋™๊ธฐํ™”๊ฐ€ ๊ฐ€๋Šฅํ•œ ์‹ค์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (์ถ”๊ฐ€ํ•  Value ์ด๋ฆ„, number ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

ํ•ด๋‹น ๊ฐ์ฒด์— ์„œ๋ฒ„, ํด๋ผ์ด์–ธํŠธ ๊ฐ„ ๋™๊ธฐํ™”๊ฐ€ ๊ฐ€๋Šฅํ•œ bool๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (์ถ”๊ฐ€ํ•  Value ์ด๋ฆ„, bool ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

ํ•ด๋‹น ๊ฐ์ฒด์— ์„œ๋ฒ„, ํด๋ผ์ด์–ธํŠธ ๊ฐ„ ๋™๊ธฐํ™”๊ฐ€ ๊ฐ€๋Šฅํ•œ ๋ฌธ์ž์—ด์„ ์ถ”๊ฐ€ํ•ด์š”. (์ถ”๊ฐ€ํ•  Value ์ด๋ฆ„, string ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

ํ•ด๋‹น ๊ฐ์ฒด์— ์„œ๋ฒ„, ํด๋ผ์ด์–ธํŠธ ๊ฐ„ ๋™๊ธฐํ™”๊ฐ€ ๊ฐ€๋Šฅํ•œ ์ปฌ๋Ÿฌ๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (์ถ”๊ฐ€ํ•  Value ์ด๋ฆ„, Color ๋ฐ์ดํ„ฐ, Enum.ReplicateType.ํƒ€์ž… , ๋™๊ธฐํ™” ์‹œ๊ฐ„)

์ผ์ • ์‹œ๊ฐ„๋’ค์— ์—ฐ๊ฒฐ ํ•จ์ˆ˜๊ฐ€ ํ˜ธ์ถœ๋˜๋Š” ์ด๋ฒคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด์š”. (์ถ”๊ฐ€ํ•  ์ด๋ฒคํŠธ ์ด๋ฆ„, ์‹œ๊ฐ„, ์—ฐ๊ฒฐ ํ•จ์ˆ˜)

๋“ฑ๋ก๋œ ์‹œ๊ฐ„ ์ด๋ฒคํŠธ๋ฅผ ์‚ญ์ œํ•ด์š”. (์‚ญ์ œํ•  ์ด๋ฒคํŠธ ์ด๋ฆ„)

Last updated