Klasa silnika
ProximityPromptService
*Ta zawartość została przetłumaczona przy użyciu narzędzi AI (w wersji beta) i może zawierać błędy. Aby wyświetlić tę stronę w języku angielskim, kliknij tutaj.
Podsumowanie
Zdarzenia
IndicatorShown(prompt: ProximityPrompt):RBXScriptSignal |
PromptButtonHoldBegan(prompt: ProximityPrompt,playerWhoTriggered: Player):RBXScriptSignal |
PromptButtonHoldEnded(prompt: ProximityPrompt,playerWhoTriggered: Player):RBXScriptSignal |
PromptHidden(prompt: ProximityPrompt):RBXScriptSignal |
PromptShown(prompt: ProximityPrompt,inputType: Enum.ProximityPromptInputType):RBXScriptSignal |
PromptTriggered(prompt: ProximityPrompt,playerWhoTriggered: Player):RBXScriptSignal |
PromptTriggerEnded(prompt: ProximityPrompt,playerWhoTriggered: Player):RBXScriptSignal |
Materiały referencyjne dotyczące interfejsów API
Właściwości
Enabled
Przykłady kodu
Włączone
local ProximityPromptService = game:GetService("ProximityPromptService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local enablePrompts = Instance.new("BindableEvent")
enablePrompts.Name = "EnablePrompts"
enablePrompts.Parent = ReplicatedStorage
-- Połącz z BindableEvent i wywołaj z innego skryptu kontrolującego logikę doświadczenia
enablePrompts.Event:Connect(function(enabled)
ProximityPromptService.Enabled = enabled
end)Zdarzenia
IndicatorHidden
Parametry
IndicatorShown
Parametry
PromptButtonHoldBegan
ProximityPromptService.PromptButtonHoldBegan(
Parametry
PromptButtonHoldEnded
ProximityPromptService.PromptButtonHoldEnded(
Parametry
PromptHidden
Parametry
PromptShown
ProximityPromptService.PromptShown(
Parametry
PromptTriggered
ProximityPromptService.PromptTriggered(
Parametry
PromptTriggerEnded
ProximityPromptService.PromptTriggerEnded(
Parametry