朱峰社區(qū)首頁(yè) 朱峰社區(qū)

搜索資源 注冊(cè)|登陸

等待

返回 展開(kāi)菜單
按功能 按軟件

Unity3D游戲制作教程

Unity3D游戲制作教程

包含5節(jié)視頻教程

本系列包含Unity3D介紹、Unity3D導(dǎo)出人物、Unity3D導(dǎo)出場(chǎng)景、Unity3D導(dǎo)出動(dòng)作、游戲測(cè)試最終完成一個(gè)簡(jiǎn)單的游戲。是一套非常完整的Unity3D游戲制作教程。

關(guān)閉

Unity組件:Input Manager 輸入管理器

關(guān)注:1499 留言:0 樓主:byron007作品 發(fā)帖時(shí)間:15年11月16日

byron007作品

普通會(huì)員

byron007作品

社區(qū)新人:1級(jí)

關(guān)注2132人

  • 積分

    1

  • 登陸

    1

  • 發(fā)帖

    1

  • 作品

    1

間隔線
Desktop

The Input Manager is where you define all the different input axes and game actions for your project.

輸入管理器可以設(shè)置項(xiàng)目的各種輸入和操作。


The Input Manager 輸入管理器

To see the Input Manager choose: Edit->Project Settings->Input.

輸入管理器位于菜單的Edit->Project Settings->Input.

Properties 屬性
  • Axes
    Contains all the defined input axes for the current project: Size is the number of different input axes in this project, Element 0, 1, ... are the particular axes to modify.
    設(shè)置當(dāng)前項(xiàng)目中的所有輸入軸:size為軸的數(shù)量。0,1…元素可以對(duì)每個(gè)軸進(jìn)行修改。
  • Name 名稱
    The string that refers to the axis in the game launcher and through scripting.
    軸的名稱,用于游戲加載界面和腳本中。
  • Descriptive Name 描述
    A detailed definition of the Positive Button function that is displayed in the game launcher.
    游戲加載界面中,軸的正向按鍵的詳細(xì)描述。
  • Descriptive Negative Name
    反向描述
    A detailed definition of the Negative Button function that is displayed in the game launcher.
    游戲加載界面中,軸的反向按鍵的詳細(xì)描述。
  • Negative Button 反向按鈕
    The button that will send a negative value to the axis.
    該按鈕會(huì)給軸發(fā)送一個(gè)負(fù)值 。
  • Positive Button 正向按鈕
    The button that will send a positive value to the axis.
    該按鈕會(huì)給軸發(fā)送一個(gè)正值 。
  • Alt Negative Button 備選反向按鈕
    The secondary button that will send a negative value to the axis.
    給軸發(fā)送負(fù)值的另一個(gè)按鈕。
  • Alt Positive Button 備選正向按鈕
    The secondary button that will send a positive value to the axis.
    給軸發(fā)送正值的另一個(gè)按鈕。
  • Gravity 重力
    How fast will the input recenter. Only used when the Type is key / mouse button.
    輸入復(fù)位的速度,僅用于類型為 鍵/鼠標(biāo) 的按鍵。
  • Dead
    Any positive or negative values that are less than this number will register as zero. Useful for joysticks.
    任何小于該值的輸入值(不論正負(fù)值)都會(huì)被視為0,用于搖桿。
  • Sensitivity
    靈敏度
    For keyboard input, a larger value will result in faster response time. A lower value will be more smooth. For Mouse delta the value will scale the actual mouse delta.
    對(duì)于鍵盤(pán)輸入,該值越大則響應(yīng)時(shí)間越快,該值越小則越平滑。對(duì)于鼠標(biāo)輸入,設(shè)置該值會(huì)對(duì)鼠標(biāo)的實(shí)際移動(dòng)距離按比例縮放。
  • Snap 對(duì)齊
    If enabled, the axis value will be immediately reset to zero after it receives opposite inputs. Only used when the Type is key / mouse button.
    如果啟用該設(shè)置,當(dāng)軸收到反向的輸入信號(hào)時(shí),軸的數(shù)值會(huì)立即置為0,僅用于鍵/鼠標(biāo) 輸入。
  • Invert 反轉(zhuǎn)
    If enabled, the positive buttons will send negative values to the axis, and vice versa.
    啟用該參數(shù)可以讓正向按鈕發(fā)送負(fù)值,反向按鈕發(fā)送正值。
  • Type 類型
    Use Key / Mouse Button for any kind of buttons, Mouse Movement for mouse delta and scrollwheels, Joystick Axis for analog joystick axes and Window Movement for when the user shakes the window.
    所有的按鈕輸入都應(yīng)設(shè)置為 鍵/鼠標(biāo) (Key / Mouse) 類型,對(duì)于鼠標(biāo)移動(dòng)和滾輪應(yīng)設(shè)為 鼠標(biāo)移動(dòng)(Mouse Movement)。搖桿設(shè)為搖桿軸 (Joystick Axis),用戶移動(dòng)窗口設(shè)為窗口移動(dòng) (Window Movement)。
  • Axis
    Axis of input from the device (joystick, mouse, gamepad, etc.)
    設(shè)備的輸入軸(搖桿,鼠標(biāo),手柄等)
  • Joy Num 搖桿編號(hào)
    Which joystick should be used. By default this is set to retrieve the input from all joysticks. This is only used for input axes and not buttons.
    設(shè)置使用哪個(gè)搖桿。默認(rèn)是接收所有搖桿的輸入。僅用于輸入軸和非按鍵。
Details 細(xì)節(jié)

All the axes that you set up in the Input Manager serve two purposes:

在輸入管理器中設(shè)置的軸有2個(gè)目的:

  • They allow you to reference your inputs by axis name in scripting
    讓你可以在腳本中通過(guò)軸的名稱來(lái)使用輸入。
  • They allow the players of your game to customize the controls to their liking
    讓游戲玩家可以自定義游戲的輸入。

All defined axes will be presented to the player in the game launcher, where they will see its name, detailed description, and default buttons. From here, they will have the option to change any of the buttons defined in the axes. Therefore, it is best to write your scripts making use of axes instead of individual buttons, as the player may want to customize the buttons for your game.

在游戲加載界面中,玩家可以看到所有定義的軸,包括名稱,詳細(xì)說(shuō)明,默認(rèn)按鍵,他們可以通過(guò)選項(xiàng)改變軸的按鍵。因此,在腳本中你最好也使用軸而不是單獨(dú)的按鍵,這樣玩家就可以在你的游戲中自定義按鍵。


The game launcher's Input window is displayed when your game is run

See also: Input.

游戲的加載界面會(huì)顯示輸入窗口。參見(jiàn) 輸入(Input)。

Hints 提示
  • Axes are not the best place to define "hidden" or secret functions, as they will be displayed very clearly to the player in the game launcher.
    軸不適合定義一些隱藏或秘密功能,因?yàn)樗鼤?huì)在加載界面中清楚地顯示給玩家。
iOS

This section is not supported on iOS devices.

該部分內(nèi)容不適用于iOS設(shè)備。

For more info on how to work with input on iOS devices, please refer to the iOS Input page.

若要獲取更多關(guān)于iOS設(shè)備如何輸入的內(nèi)容,請(qǐng)參見(jiàn)iOS Input頁(yè)面。

Android

This section is not supported on Android devices.

該部分內(nèi)容不適用于Android設(shè)備。

For more info on how to work with input on Android devices, please refer to the Android Input page.

若要獲取更多關(guān)于Android設(shè)備如何輸入的內(nèi)容,請(qǐng)參見(jiàn) 安卓輸入( Android Input)頁(yè)面。

贊0 踩0

未知用戶

2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號(hào)

回頂部

1.復(fù)制文本發(fā)給您的QQ好友或群、微信等;好友點(diǎn)擊鏈接以后,轉(zhuǎn)發(fā)就成功了。 2.如朋友點(diǎn)擊您的鏈接,您需要需刷新一下才行;同一個(gè)好友僅能點(diǎn)擊一次。
購(gòu)買(mǎi)VIP,觀看所有收費(fèi)教程。