서버와 통신하기
이 장에서는 펑크랜드의 핵심 기능 중 하나인 서버와 메세지로 통신하는 기능에 대해서 알아봅니다.
FireEvent와 GetTopic의 이해
-- 클라이언트에서 "Apple" 이란 주제로 FireEvent를 발송했을 때
-- 모든 클라이언트들에게 "Apple" 이란 메시지 표시하기
Server.GetTopic("Apple").Add(function()
Server.SendCenterLabel("Apple")
end)
Client.FireEvent("Apple")직렬화 문제
1. string과 number 타입 처리
2. table 타입 처리
3. UserData 타입 처리
Last updated