요약
메서드
BindToMessage(topic: string,function: function):RBXScriptConnection |
BindToMessageParallel(topic: string,function: function):RBXScriptConnection |
SendMessage(topic: string,message: Tuple):() |
상속된 멤버
API 참조
메서드
BindToMessage
코드 샘플
메시지에 바인딩
local actor = script:GetActor()
-- Actor에 인사 메시지가 전송될 때 메시지를 출력합니다.
-- 이 스크립트는 Actor의 자손입니다.
local connection = actor:BindToMessage("Greeting", function(message)
print("받은 인사 메시지:", message)
end)BindToMessageParallel
코드 샘플
메시지 병렬 바인딩
local actor = script:GetActor()
-- Actor에 인사 메시지가 전송될 때 메시지를 출력합니다.
-- 이 스크립트는 Actor의 자손입니다.
local connection = actor:BindToMessageParallel("Greeting", function(message)
print("인사 메시지를 수신했습니다:", message)
end)