- 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.
- Aftershot Pro:Non-destructive photo editing and management
- Learning AngularJS Animations
- Mastering Delphi Programming:A Complete Reference Guide
- 施耐德SoMachine控制器應(yīng)用及編程指南
- 電腦組裝、維護(hù)、維修全能一本通(全彩版)
- 3ds Max Speed Modeling for 3D Artists
- scikit-learn:Machine Learning Simplified
- Practical Machine Learning with R
- OpenGL Game Development By Example
- Machine Learning with Go Quick Start Guide
- The Artificial Intelligence Infrastructure Workshop
- 基于網(wǎng)絡(luò)化教學(xué)的項(xiàng)目化單片機(jī)應(yīng)用技術(shù)
- USB應(yīng)用開(kāi)發(fā)寶典
- 計(jì)算機(jī)組裝與維護(hù)(慕課版)
- 施耐德M241/251可編程序控制器應(yīng)用技術(shù)