单击f1或f2时,如何切换bool false或true [英] How can I switch a bool false or true when I click f1 or f2

查看:104
本文介绍了单击f1或f2时,如何切换bool false或true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在尝试学习c#而我正在制作一款游戏作弊的作弊..

我想通过点击f1或f2切换一个bool(True和False)。

Hello,

I'm trying to study c# and I'm making cheats for a game to impoof..
I want to toggle a bool (True and False) by clicking f1 or f2.

public bool bAimbotEnabled = true;
public bool bVisibleCheck = true;





感谢您的帮助!



我尝试了什么:



我没有尝试过什么......找不到多少..



Thank you for helping!

What I have tried:

I tried nothing much just yet.. Can't find much..

推荐答案

您需要添加一个事件处理程序来捕获按键并测试被按下的F1或F2。
You need to add an event handler that captures keypresses and test for F1 or F2 being pressed.


这篇关于单击f1或f2时,如何切换bool false或true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆