Motor Sınıfı
GamepadService
*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.
API Referansı
Özellikler
GamepadCursorEnabled
Kod Örnekleri
Oyun Kumandası Servisi - Oyun Kumandası İmleci Etkin Özelliği
local gamepadService = game.GamepadService
gamepadService:GetPropertyChangedSignal("GamepadCursorEnabled"):Connect(function()
local enabled = gamepadService.GamepadCursorEnabled
if enabled then
-- Sanal imleç etkin olduğunda özel kod
else
-- Sanal imleç devre dışı olduğunda özel kod
end
end)Yöntemler
DisableGamepadCursor
GamepadService:DisableGamepadCursor():()
Dönüşler
()
Kod Örnekleri
GamepadService - Oyun Kumandası İşaretçisini Devre Dışı Bırak
local gamepadService = game.GamepadService
local userInputService = game.UserInputService
userInputService.InputBegan:Connect(function(inputObject, gameProcessed)
if inputObject.KeyCode == Enum.KeyCode.ButtonB then
gamepadService:DisableGamepadCursor()
end
end)EnableGamepadCursor
Parametreler
Dönüşler
()
Kod Örnekleri
Oyun Kolu Servisi - Oyun Kolu İmlecini Etkinleştir
local gamepadService = game.GamepadService
local userInputService = game.UserInputService
local startObject = script.Parent
userInputService.InputBegan:Connect(function(inputObject, gameProcessed)
if inputObject.KeyCode == Enum.KeyCode.ButtonA then
gamepadService:EnableGamepadCursor(startObject)
end
end)