当前位置:网站首页>Can I "reverse" a Boolean value- Can I 'invert' a bool?
Can I "reverse" a Boolean value- Can I 'invert' a bool?
2022-07-04 15:52:00 【Bustling city 】
problem :
I have some checks to see if a screen is active. I have some checks to see if the screen is active .The code looks like this: The code is as follows :
if (GUI.Button(new Rect(Screen.width / 2 - 10, 50, 50, 30), "Rules")) //Creates a button { if (ruleScreenActive == true) //check if the screen is already active ruleScreenActive = false; //handle according to that else ruleScreenActive = true; }
Is there any way to - whenever I click the button - invert the value of ruleScreenActive
? What can be done - Whenever I click a button - reverse ruleScreenActive
Value ?
(This is C# in Unity3D)( This is a Unity3D Medium C#)
Solution :
Reference resources : https://stackoom.com/en/question/bOVd边栏推荐
- PXE网络
- In today's highly integrated chips, most of them are CMOS devices
- AI has surpassed Dr. CS in question making?
- MySQL学习笔记——数据类型(2)
- Neuf tendances et priorités du DPI en 2022
- Temperature control system based on max31865
- Intelligent customer service track: Netease Qiyu and Weier technology play different ways
- 科研漫画 | 联系到被试后还需要做什么?
- Hexadecimal form
- LeetCode 35. 搜索插入位置 —vector遍历(O(logn)和O(n)的写法---二分查找法)
猜你喜欢
lnx 高效搜索引擎、FastDeploy 推理部署工具箱、AI前沿论文 | ShowMeAI资讯日报 #07.04
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
[Dalian University of technology] information sharing of postgraduate entrance examination and re examination
Case sharing | integrated construction of data operation and maintenance in the financial industry
Weekly recruitment | senior DBA annual salary 49+, the more opportunities, the closer success!
MySQL学习笔记——数据类型(2)
Numpy notes
Deep learning neural network case (handwritten digit recognition)
函数式接口,方法引用,Lambda实现的List集合排序小工具
Audio and video technology development weekly | 252
随机推荐
Deep learning network regularization
Common API day03 of unity script
深入JS中几种数据类型的解构赋值细节
每周招聘|高级DBA年薪49+,机会越多,成功越近!
In today's highly integrated chips, most of them are CMOS devices
Hexadecimal form
Redis哨兵模式实现一主二从三哨兵
LeetCode 35. Search the insertion position - vector traversal (O (logn) and O (n) - binary search)
开源人张亮的 17 年成长路线,热爱才能坚持
Selenium element interaction
mysql 联合主键_Mysql 创建联合主键[通俗易懂]
Intelligent customer service track: Netease Qiyu and Weier technology play different ways
数据库函数的用法「建议收藏」
web聊天室实现
What encryption algorithm is used for the master password of odoo database?
Quelles sont les perspectives de l'Internet intelligent des objets (aiot) qui a explosé ces dernières années?
An article learns variables in go language
Unity脚本API—GameObject游戏对象、Object 对象
【读书会第十三期】 音频文件的封装格式和编码格式
What is the future of the booming intelligent Internet of things (aiot) in recent years?