[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | local function TestFunction() local testTable = {} testTable[1] = "A" testTable[2] = "B" testTable[3] = "C" end ---@type table<integer, string> local tableValue = TestFunction()
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type function(param_name: PARAM_TYPE):RETURN_TYPE
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type function() local testFunction = function() end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type function(testParamA:string, testParamB:Entity) local testFunction = function(testParamA, testParamB) end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type function(testParamA:string, testParamB:Entity):AttackComponent local testFunction = function(testParamA, testParamB) return atkComponent end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type function(testParamA:string, testParamB:Entity):AttackComponent, string local testFunction = function(testParamA, testParamB) return atkComponent, "strValue" end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type (function(testParamA:string, testParamB:Entity):AttackComponent, string), Entity local testFunction, testEntity = function(testParamA, testParamB) return atkComponent, "strValue" end, self.Entity
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | local function TestFunction() return function(paramA, paramB) return "strValue", false end end ---@type function(paramA:string, paramB:AttackComponent):string, boolean local test = TestFunction()
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type function(paramA:string, paramB:AttackComponent):string, boolean local test = TestFunction() local strValue, boolValue = test("param", self.Entity.AttackComponent)
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@type (function(paramA:string, paramB:Entity):AttackComponent,string), Entity local testFunction, testEntity = function(testParamA, testParamB) return atkComponent, "strValue" end, self.Entity
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@param param_name PARAM_TYPE
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@param testParamA Entity local function TestFunction(testParamA) end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@param testParamA Entity ---@param testParamB integer local function TestFunction(testParamA, testParamB) end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@return TYPE
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@return Entity local function TestFnction(testParamA, testParamB) return self.Entity end
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@return Entity, string local function TestFunction(testParamA, testParamB) return self.Entity, "strValue" end
[source] | guide_examples [title] | 배경음악, 효과음 만들기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=825 [code] | Property: [None] Entity CardPairGameUI = /ui/CardPairGameUI [None] number PlayTime = 60 [None] number RemainingTime = 0 Method: [client only] void OnBeginPlay() { self:StartGame() } [client only] void StartGame() { self.CardPairGameUI.Enable = true self.RemainingTime = self.PlayTi
[source] | guide_examples [title] | 모바일 기기의 중력 센서 사용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=831 [code] | void GyroscopeCheck (boolean onoff) { if _MobileGyroscopeService:IsHWSupported() then if _MobileGyroscopeService:IsEnabled() then _MobileGyroscopeService:StopAndWait() else _MobileGyroscopeService:StartAndWait() end else _UIToast:ShowMessage("Failed to start
[source] | guide_examples [title] | 모바일 기기의 가속도 센서 사용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=832 [code] | if _MobileAccelerometerService:IsHWSupported() then if _MobileAccelerometerService:IsEnabled() then _MobileAccelerometerService:Stop() else _MobileAccelerometerService:Start() end else _UIToast:ShowMessage("Failed to start Accelerometer") end
[source] | guide_examples [title] | 월드코인 환불하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=835 [code] | -- 구매자의 상품 구매 요청에 대한 콜백 함수 등록 _WorldShopService:SetProcessPurchaseCallback(function(purchaseInfo) -- 구매에 대한 처리가 완료되면 관련 정보를 기록합니다. _LogStorageService:LogPurchaseInfo(purchaseInfo, "아이템 구매 완료") end)
[source] | guide_examples [title] | 월드코인 환불하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=835 [code] | -- 협정 세계시 기준으로 11월 25일부터 11월 30일 사이에 기록된 구매 정보를 조회합니다. local fromDate = DateTime(2022, 11, 25) local toDate = DateTime(2022, 11, 30) _LogStorageService:GetPurchaseLogPagesAsync(fromDate, toDate, function(purchaseLogPages) while true do -- GetCurrentPageDatas()로 현재 페이지의 목록을 가져옵니다.
[source] | guide_examples [title] | 인벤토리 스크립트 작성하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=942 [code] | Property: [Sync] boolean IsInitialized = false Function: [server only] void OnBeginPlay() { -- inventoryData에 UserItemDataSet를 불러옴 self._T.inventoryData = {} for i = 1, _DataService:GetRowCount("UserItemDataSet") do self._T.inventoryData[i] = 0 end local userDataStorage =
[source] | guide_examples [title] | 인벤토리 스크립트 작성하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=942 [code] | Property: SyncTable<number> AllItemCounts
[source] | guide_examples [title] | 인벤토리 스크립트 작성하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=942 [code] | Property : number ItemIndex = 0 number ItemCount = 0
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | [server only] void OnBeginPlay() { local a = 7 -- if 조건 then 실행 내용 end if a > 10 then log("big") -- elseif 조건 then 실행 내용 elseif a > 5 then log("middle") -- else 실행 내용 else log("little") end }
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | -- while 조건 do 반복할 내용 end local a = 10 while(a <= 15) do log(a) a = a + 2 end --[[결과: 10 12 14 ]]
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | local countdown = 5 repeat countdown = countdown - 1 log(countdown) until countdown == 0 log("The countdown is over.") --[[결과: 4 3 2 1 0 The countdown is over. ]]
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | -- for 변수 = 초깃값, 최종값, 증감값 do end -- 증가값이 1인 경우에는 1을 생략해도 됩니다. for i = 10, 15 do log(i) end --[[결과: 10 11 12 13 14 15 ]] for i = 20, 10, -2 do log(i) end --[[결과: 20 18 16 14 12 10 ]]
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | local testArray = {"A", "B", "C", "D", "E"} for index, value in ipairs(testArray) do log(index, value) end --[[결과: 1 A 2 B 3 C 4 D 5 E ]]
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | local testdictionary = {name = "Tom", age = 20, favoriteGame = "MapleStory Worlds", job = "Programmer"} for key, value in pairs(testdictionary) do print(key, value) end --[[결과: favoriteGame MapleStory Worlds name Tom job Programmer age 20 ]]