Controller

非推奨を表示

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。

作成できません

コントローラオブジェクトのベースクラス、例えば HumanoidController オブジェクト。

概要

方法

イベント

  • バインドボタンの押された状態が変更されたときに発射されます。このイベントは、Controller:GetButton() と一緒に使用して、バインドボタンが押されているかどうかを確認することができます。

プロパティ

方法

BindButton

()

指定されたボタンに上書きバインドを有効にします。

パラメータ

button: Enum.Button
既定値: ""
caption: string
既定値: ""

戻り値

()

コードサンプル

The example below when placed inside a LocalScript, would result in a GUI saying "Press Backspace to win!".

Controller:BindButton1

local ControllerService = game:GetService("ControllerService")
local humanoidController = ControllerService:FindFirstChildOfClass("HumanoidController")
humanoidController:BindButton(Enum.Button.Dismount, "win!")

GetButton

ボタンが押されているかどうかを返します。

パラメータ

button: Enum.Button
既定値: ""

戻り値

UnbindButton

()

ボタンのバインドを削除します。

パラメータ

button: Enum.Button
既定値: ""

戻り値

()

イベント

ButtonChanged

バインドボタンの押された状態が変更されたときに発射されます。このイベントは、Controller:GetButton() と一緒に使用して、バインドボタンが押されているかどうかを確認することができます。

パラメータ

button: Enum.Button