[source] | examples [title] | TweenLogic [page] | apiReference/Logics/TweenLogic [code] | Method: [server only] void OnBeginPlay () { local originalPosition = self.Entity.TransformComponent.Position local tweenCallback = function (tweenValue) self.Entity.TransformComponent.Position = originalPosition + tweenValue:ToVector3() end _TweenLogic:PlayTween(Vector2(0,0), Vector2(6,0), 6,
[source] | examples [title] | TweenLogic [page] | apiReference/Logics/TweenLogic [code] | Method: [server only] OnBeginPlay () { self._T.originalPosition = self.Entity.TransformComponent.Position self._T.elapsedTime = 0 self._T.tweenDuration = 6 self._T.isTweening = true } [server only] void OnUpdate (number delta) { if not self._T.isTweening then return end self._T.elapsedT
[source] | examples [title] | TweenLogic [page] | apiReference/Logics/TweenLogic [code] | local tweener = _TweenLogic:MakeNativeTween(1, 0, 3, EaseType.Linear, self.Entity.SpriteRendererComponent, "SetAlpha") tweener:Play()
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local errorCode = ds:SetAndWait("key", "value") if errorCode ~= 0 then error("Failed to SetAndWait. Error : " + tostring(errorCode)) return end
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local errorCode, value = ds:GetAndWait("key") if errorCode ~= 0 then error("Failed to GetAndWait. Error : " + tostring(errorCode)) return end
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local errorCode = ds:DeleteAndWait("key") if errorCode ~= 0 then error("Failed to DeleteAndWait. Error : " + tostring(errorCode)) return end
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() ds:SetAsync("key", "value", function(errorCode, key) -- 작업이 완료되면 호출됩니다. if errorCode ~= 0 then error("Failed to SetAsync. Error : " + tostring(errorCode)) return end end)
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() ds:GetAsync("key", function(errorCode, key, value) -- 작업이 완료되면 호출됩니다. if errorCode ~= 0 then error("Failed to GetAsync. Error : " + tostring(errorCode)) return end end)
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() ds:DeleteAsync("key", function(errorCode, key) -- 작업이 완료되면 호출됩니다. if errorCode ~= 0 then error("Failed to DeleteAsync. Error : " + tostring(errorCode)) return end end)
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyInfo = DataStorageKeyInfo("Key", "Version", "Tag") local errorCode = ds:SetByInfoAndWait(keyInfo, "Value") if errorCode ~= 0 then error("Failed to SetByInfoAndWait. Error : " + tostring(errorCode)) return end
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyInfo = DataStorageKeyInfo("Key", "Version", "Tag") local errorCode, value = ds:GetByInfoAndWait(keyInfo) if errorCode ~= 0 then error("Failed to GetByInfoAndWait. Error : " + tostring(errorCode)) return end
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyValues = {} keyValues["Key1"] = "Value1" keyValues["Key2"] = "Value2" local errorCode, keys = ds:BatchSetAndWait(keyValues) if errorCode ~= 0 then error("Failed to BatchSetAndWait. Error : " + tostring(errorCode)) return e
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keys = {} table.insert(keys, "Key1") table.insert(keys, "Key2") local getResultCode, pages = ds:BatchGetAndWait(keys) if getResultCode ~= 0 then error("Failed to BatchGetAndWait. Error : " + tostring(getResultCode)) return end
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keys = {} table.insert(keys, "Key1") table.insert(keys, "Key2") local errorCode, deletedKeys = ds:BatchDeleteAndWait(keys) if errorCode ~= 0 then error("Failed to BatchDeleteAndWait. Error : " + tostring(errorCode)) return en
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyInfoValues = {} local keyInfo1 = DataStorageKeyInfo("Key1", "Version1", "Tag1") local keyInfo2 = DataStorageKeyInfo("Key2", "Version2", "Tag2") keyInfoValues[keyInfo1] = "Value1" keyInfoValues[keyInfo2] = "Value2" local errorCode,
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyInfos = {} local keyInfo1 = DataStorageKeyInfo("Key1", "Version1", "Tag1") local keyInfo2 = DataStorageKeyInfo("Key2", "Version2", "Tag2") table.insert(keyInfos, keyInfo1) table.insert(keyInfos, keyInfo2) local getResultCode, pages
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local getResultCode, pages = ds:GetPagesAndWait("Tag") if getResultCode ~= 0 then error("Failed to GetPagesAndWait. Error : " + tostring(getResultCode)) return end while true do -- 현재 페이지의 목록을 가져옵니다. local datas = pages:GetCu
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local oldKeyInfo = DataStorageKeyInfo("Key", "OldVersion", "Tag") local errorCode = ds:SetByInfoAndWait(oldKeyInfo, "OldValue") if errorCode ~= 0 then error("Failed to SetByInfoAndWait. Error : " + tostring(errorCode)) return end --
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local minDate = DateTime(2023, 03, 09, 20, 20, 0, 0) local maxDate = DateTime(2023, 03, 09, 22, 20, 0, 0) -- 값을 저장할 때 버전 값을 함께 지정한 경우에만 조회할 수 있습니다. local getResultCode, pages = ds:GetVersionsAndWait("Key", SortDirection.Ascending, minDate, m
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local getResultCode, oldValue = ds:GetAndWait("Key") if getResultCode ~= 0 then error("Failed to GetAndWait. Error : " + tostring(getResultCode)) return end -- DataStorage 안에 예상하는 값이 저장되어 있을 경우 "NewValue"를 저장합니다. 다른 값이 저장되어 있을 경우 실패합
[source] | examples [title] | DataStorageItemPages [page] | apiReference/Misc/DataStorageItemPages [code] | while true do -- 현재 페이지의 목록을 가져옵니다. local datas = pages:GetCurrentPageDatas() for _, data in pairs(datas) do -- DataStorageItem을 통해 키, 버전, 태그, 값을 조회할 수 있습니다. log(data.KeyInfo.Key) log(data.KeyInfo.Tag) log(data.KeyInfo.Version) log(data.Value) end -- 현재 페이지가 마지막 페이지인지 확인합니다. i
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local errorCode = ds:SetAndWait("key", "value")
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local errorCode, value = ds:GetAndWait("key")
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local errorCode = ds:DeleteAndWait("key")
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") ds:SetAsync("key", "value", function(errorCode, key) -- 작업이 완료되면 호출됩니다. end)
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") ds:GetAsync("key", function(errorCode, key, value) -- 작업이 완료되면 호출됩니다. end)
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") ds:DeleteAsync("Key", function(errorCode, key) -- 작업이 완료되면 호출됩니다. end)
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local keyInfo = DataStorageKeyInfo("Key", "Version1", "TestTag") local errorCode = ds:SetByInfoAndWait(keyInfo, "value")
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local keyInfo = DataStorageKeyInfo("Key", "Version1", "TestTag") local errorCode, value = ds:GetByInfoAndWait(keyInfo)
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local keyValues = {} keyValues["Key1"] = "Value1" keyValues["Key2"] = "Value2" local errorCode, keys = ds:BatchSetAndWait(keyValues)lua