📜  unity 鼠标左键 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:18.129000             🧑  作者: Mango

代码示例2
// ============== Primary Mouse Button (Left Click) ========================
// It is true aslong the user holds the left mouse button
// Like shooting with an Automatic Gun - AK 47 :P
Input.GetKey(KeyCode.Mouse0)

// It only triggers 1 time when you click
// Like shooting a semi automatic pistol - Desert Eagle ;)
Input.GetButtonDown("Fire1")