文章分类 -  Unity / Unity - 输入

摘要:https://www.youtube.com/watch?v=Yjee_e4fICc 阅读全文
posted @ 2023-11-03 18:18 匿鱼 阅读(11) 评论(0) 推荐(0)
摘要:###键盘监听按下与抬起事件绑定 private bool holdingDown = false; void Update() { if (Input.anyKey) { keyCodeEvent.Invoke(); holdingDown = true; } if (!Input.anyKey 阅读全文
posted @ 2021-12-24 23:52 匿鱼 阅读(44) 评论(0) 推荐(0)
摘要://使用带参委托实现获取任意输入键位值 private Action<string> MyDelegate2; void Start() { rb = GetComponent<Rigidbody>(); MyDelegate2 = delegate (string str){ Debug.LogE 阅读全文
posted @ 2021-12-21 14:39 匿鱼 阅读(60) 评论(0) 推荐(0)