- Unreal Development Kit Game Programming with UnrealScript:Beginner's Guide
- Rachel Cordone
- 154字
- 2021-08-27 11:59:04
Variables and arrays
There are many different types of variables. Choosing which one we want to use depends on what we want to do with it. Knowing whether it's raining or not (true/false) is different from say, knowing a character's name ("Big McLargeHuge"). Let's take a look at some of the variables we can use and what they're used for.
Booleans
Quick, is it raining? Boolean variables, or bool for short, are your basic true/false questions. They're used for everything from asking if the player is driving a vehicle, to if the game has started, to whether or not an object can collide with anything.
It's standard for boolean variables' names to start with a lower case "b". This isn't required, but it's good to follow the guidelines to keep code consistent and easily readable.
Let's take a look at how we can use booleans in our code by adding to our AwesomeActor class.
- 24小時學會電腦組裝與維護
- Python GUI Programming:A Complete Reference Guide
- 嵌入式技術基礎與實踐(第5版)
- Intel FPGA/CPLD設計(高級篇)
- Getting Started with Qt 5
- The Applied AI and Natural Language Processing Workshop
- 硬件產品經理手冊:手把手構建智能硬件產品
- Mastering Adobe Photoshop Elements
- 分布式系統與一致性
- R Deep Learning Essentials
- Spring Cloud微服務架構實戰
- STM32嵌入式技術應用開發全案例實踐
- Rapid BeagleBoard Prototyping with MATLAB and Simulink
- 計算機組裝維修與外設配置(高等職業院校教改示范教材·計算機系列)
- Hands-On Artificial Intelligence for Banking