#region 快捷键
bool isDown = false;
KeyCode currentKey;
void Update()
{
// 普通奖
if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.Keypad0))
{
if (isDown)
return;
isDown = true;
Debug.LogError("CTRL + 0 普通奖");
}
//幸运送次数 幸运座位,在正常中奖的前提下,多送1--11个动物 (恭喜发财)
if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.Keypad1))
{
if (isDown)
return;
isDown = true;
Debug.LogError("CTRL + 1 幸运送次数");
}
//送颜色(同颜色中奖)
if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.Keypad2))
{
if (isDown)
return;
isDown = true;
Debug.LogError("CTRL + 2 送颜色");
}
//送动物(同动物中奖)
Unity之快捷键组合
最新推荐文章于 2024-06-05 14:56:57 发布
本文介绍了Unity中使用LeftControl和LeftAlt键配合数字键实现的各种功能,如普通奖、幸运送次数、送颜色等,详细列举了每种快捷键组合对应的输出效果。
摘要由CSDN通过智能技术生成