Unity3D点击鼠标按键代码.docxVIP

  • 19
  • 0
  • 约1.1千字
  • 约 3页
  • 2019-07-14 发布于湖北
  • 举报
Unity3D点击鼠标按键代码 Posted on 2013年02月25日 by U3d / \o 查看 Unity3D脚本/插件 中的全部文章 Unity3D脚本/插件/被围观 281 次 Unity3D点击鼠标按键代码如下: nput.GetMouseButton 获取鼠标按钮 static function GetMouseButton (button : int) : bool Description描述 Returns whether the given mouse button is held down. 当指定的鼠标按钮被按下时返回true /button/ values are 0 for left button, 1 for right button, 2 for the middle button. button值设定为 0对应左键 , 1对应右键 , 2对应中键。 C# JavaScript using UnityEngine; using System.Collections; public class example : MonoBehaviour { void Update() { if (Input.GetMouseButton(0)) Debug.Log(Pressed left click.); if (Input.GetMouseB

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档