当前位置:网站首页>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边栏推荐
- Data Lake Governance: advantages, challenges and entry
- 左右对齐!
- 深入JS中几种数据类型的解构赋值细节
- 宽度精度
- CentOS 6.3 下 PHP编译安装JSON模块报错解决
- 函数式接口,方法引用,Lambda实现的List集合排序小工具
- How to rapidly deploy application software under SaaS
- c# 实现定义一套中间SQL可以跨库执行的SQL语句
- The per capita savings of major cities in China have been released. Have you reached the standard?
- MySQL组合索引(多列索引)使用与优化案例详解
猜你喜欢

Stress, anxiety or depression? Correct diagnosis and retreatment

Force button brush question 01 (reverse linked list + sliding window +lru cache mechanism)

MySQL learning notes - data type (2)

Book of night sky 53 "stone soup" of Apache open source community

Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
Detailed explanation of MySQL composite index (multi column index) use and optimization cases

MySQL learning notes - data type (numeric type)

In today's highly integrated chips, most of them are CMOS devices

力扣刷题01(反转链表+滑动窗口+LRU缓存机制)

The 17 year growth route of Zhang Liang, an open source person, can only be adhered to if he loves it
随机推荐
科普达人丨一文看懂阿里云的秘密武器“神龙架构”
深入JS中几种数据类型的解构赋值细节
CentOS 6.3 下 PHP编译安装JSON模块报错解决
C1 certification learning notes 3 -- Web Foundation
An article learns variables in go language
Salient map drawing based on OpenCV
干货 | fMRI标准报告指南新鲜出炉啦,快来涨知识吧
Usage of database functions "recommended collection"
[book club issue 13] packaging format and coding format of audio files
[learning notes] matroid
Halcon knowledge: NCC_ Model template matching
中国主要城市人均存款出炉,你达标了吗?
Big God explains open source buff gain strategy live broadcast
[book club issue 13] coding format of video files
LeetCode 35. 搜索插入位置 —vector遍历(O(logn)和O(n)的写法---二分查找法)
数据湖治理:优势、挑战和入门
Temperature control system based on max31865
The 17 year growth route of Zhang Liang, an open source person, can only be adhered to if he loves it
从0到1建设智能灰度数据体系:以vivo游戏中心为例
华为云数据库DDS产品深度赋能