Index
A
- access modifier
- about / Changing variables
- animator
- array
- about / What is an array?
- declaring / Declaring an array
- versus List<T> / List<T> versus arrays
- data, retrieving / Retrieving the data from the Array or List<T>
- size, checking / Checking the size
- data, searching / Searching for data inside an array
- ArrayList
- about / ArrayList
- Awake() method
B
- behavior
- teaching, to GameObjects / Teaching behavior to GameObjects
- buttons
- about / Buttons
- simple button / A simple button
- image / Image
- component / The Button component
- component, URL / The Button component
- interaction / Interaction
- action / The Button action
C
- C# documentation
- C# script files
- working with / Working with C# script files
- issues / Lots of files can create a mess
- creating / Creating a C# script file
- C# statements
- writing / Writing C# statements properly
- canvas
- hiding / Hiding and showing the Canvas
- showing / Hiding and showing the Canvas
- CircleCollider2D / CircleCollider2D
- class
- defining / Introducing the class
- inheritance / Inheritance
- class definition
- code
- PlayerController.cs / Code
- Code Block 3 / Variable scope – determining where a variable can be used
- code decision
- creating / Making decisions in code
- NOT operator used, for changing condition / Using the NOT operator to change the condition
- conditions, checking in if statement / Checking many conditions in an if statement
- else if used, for making complex decisions / Using else if to make complex decisions
- making, based on user input / Making decisions based on user input
- coin prefab
- about / The coin prefab
- collectable class / The Collectable class
- collectables
- about / Collectables
- components
- used, for communicating / Components that communicate using dot syntax
- custom constructors
- about / Custom constructors
D
- data
- retrieving, in arrays / Retrieving the data from the Array or List<T>
- retrieving, in List<T> / Retrieving the data from the Array or List<T>
- searching, in array / Searching for data inside an array
- dictionaries
- about / Dictionaries
- values, accessing / Accessing values
- Hashtable content, examining / How do I know what's inside my Hashtable?
- dots
- defining / What's with the dots?
- dot syntax
- used, for components / Components that communicate using dot syntax
F
- foreach loop
- about / The foreach loop
- for loop
- about / The for loop
- initializer / The for loop
- condition / The for loop
- iterator / The for loop
- example / An example
- versus while loop / while versus for loops
G
- game
- about / Your first game – avoiding the trap of the never-ending concept
- idea / The idea
- mechanics / Game mechanics and core components
- core components / Game mechanics and core components
- complex idea, breaking into smaller parts / Breaking a complex idea into smaller parts
- target platform / Target platform and resolution
- resolution / Target platform and resolution
- target screen resolution / Target screen resolution
- starting / Starting the game
- restarting / Restarting the game
- player starting position, setting up / Setting up the player starting position
- game, building
- about / Jake on the mysterious planet – the feature list
- procedural level generation / Procedural level generation
- 2D character, animated / An animated 2D character
- physics / Physics
- mouse and touch controls / Mouse and touch controls
- collectables and obstacles / Collectables and obstacles
- scoring / Scoring
- user interface (UI) / UI – the user interface
- GameManager
- singleton class / Singleton class
- game, starting / Starting the game
- game, restarting / Restarting the game
- player starting position, setting up / Setting up the player starting position
- code / Code in this chapter
- GameObject
- script, adding to / Adding our script to GameObject
- GameObjects
- behavior, teaching to / Teaching behavior to GameObjects
- gameplay loop
- about / Gameplay loops
- GameView
- golden rule
- about / Naming a variable
H
- Hashtable
- Add function / Dictionaries
- high score
- about / High score and persisting data
I
- input keys
- setting up / Setting up input keys
- Inspector, Unity
- component properties / Understanding component properties in Unity's Inspector
- variables, turning to component properties / Variables become component properties
- script name changes / Unity changes script and variable names slightly
- variable name changes / Unity changes script and variable names slightly
- propertys value, changing / Changing a property's value in the Inspector panel
- public variables, displaying / Displaying public variables in the Inspector panel
- instance
- about / Instance? What is it?
- instantiating
- about / Instantiating
- IsNumberEven method / Loops in statements
- items
- storing, in List / Storing items in the List
L
- LearningScript
- opening, in MonoDevelop / Opening LearningScript in MonoDevelop
- level
- extending / Extending the level
- level, versus designed levels
- generating / Generating levels versus designed levels
- level chunk, creating / Creating a level chunk
- LevelGenerator class, planning / Planning the LevelGenerator class
- LevelGenerator, writing / Writing LevelGenerator
- code, commenting on / Commenting on your code
- LevelGenerator
- writing / Writing LevelGenerator
- testing / Testing LevelGenerator
- LevelGenerator class
- planning / Planning the LevelGenerator class
- level piece
- copy, creating / Creating a copy of the level piece
- List
- items, storing / Storing items in the List
- operations / Common operations with Lists
- List<T>
- versus arrays / List<T> versus arrays
- data, retrieving / Retrieving the data from the Array or List<T>
- size, checking / Checking the size
- loops
- about / Introduction to loops
- foreach loop / The foreach loop
- for loop / The for loop
- using, in statements / Loops in statements
- breaking / Breaking the loop
M
- Mecanim / Animator
- method
- about / What is a method?
- used, instead of function / Using the term "method" instead of "function"
- names, as substitutes / Method names are substitutes, too
- value, returning from / Returning a value from a method
- method parameters
- methods
- used, in script / Using methods in a script
- naming / Naming methods properly
- method names, beginning with uppercase letter / Beginning method names with an uppercase letter
- multiword names used, for method / Using multiword names for a method
- parentheses, including / Parentheses are part of the method's name
- defining / Defining a method the right way
- minimum requirements / The minimum requirements for defining a method
- using, with objects / Using methods with objects
- Microsoft's C# scripting documentation
- reference link / C# documentation – where to find it? Do I need it at all?
- modulo
- about / Modulo
- MonoDevelop
- LearningScript, opening in / Opening LearningScript in MonoDevelop
- MonoDevelop, and Unity
- C# files, syncing between / Syncing C# files between MonoDevelop and Unity
- MonoDevelop code editor
- multiword variable names
- using / Using multiword variable names
N
- namespace
O
- Object-Oriented Programming (OOP)
- objects
- working with / Working with objects is a class act, Few facts
- example / Example
- instantiating / Instantiating an object
- methods, using / Using methods with objects
- OOP / Bored yet?
- operations, List
- Add / Common operations with Lists
- Remove / Common operations with Lists
- Clear / Common operations with Lists
- Contains / Common operations with Lists
- Insert / Common operations with Lists
- ToArray / Common operations with Lists
- overloading
- about / Overloading
P
- parameters
- defining / How many parameters can a method have?
- parameters, method
- specifying / Specifying a method's parameters
- parentheses
- Play button
- clicking / Click on Play!
- PlayerController
- about / PlayerController
- PlayerController.cs / PlayerController.cs
- player prefab
- preparing / Preparing the player prefab
- Rigidbody 2D / Rigidbody2D
- CircleCollider2D / CircleCollider2D
- private variables
- about / Private variables
- Project tab
- public variables
- displaying, in Inspector panel / Displaying public variables in the Inspector panel
R
- Rigidbody 2D / Rigidbody2D
S
- script
- adding, to GameObject / Adding our script to GameObject
- methods, using / Using methods in a script
- script files, creating in Unity
- issue, catching / Watching for possible gotchas while creating script files in Unity
- scriptphobia
- dealing with / Dealing with scriptphobia
- singleton class
- about / Singleton class
- sprites
- Start() method
- synchronization
T
- tools
- defining / Paper and pencil are powerful tools
- triggers
- using / Using triggers
U
- UI values
- and Update function / The Update function and UI values
- Unity
- downloading / Downloading Unity
- download link / Downloading Unity
- free license, obtaining / Obtaining a free license
- reference link / Using Unity's documentation
- Unity community
- Unity documentation
- about / Using Unity's documentation
- accessing / Using Unity's documentation
- Unity Forums
- reference link / The Unity community – asking others for help
- Unity Project
- setting up, for game / Setting up a new Unity project for our game
- backing up / Backup
- project, keeping clean / Keeping your project clean
- Update() method
- Update function
- and UI values / The Update function and UI values
- user input
- about / User input
- jump / Jump
- User Interface (UI)
- about / Introducting the Unity UI
- URL / Introducting the Unity UI
- views / Views
- buttons / Buttons
- canvas, hiding / Hiding and showing the Canvas
- canvas, showing / Hiding and showing the Canvas
- reference exceptions / Reference exceptions
V
- value
- returning, from method / Returning a value from a method
- returning / Returning the value
- example / Example
- variable
- defining / Understanding what a variable is and what it does, Creating a variable and seeing how it works
- naming / Naming a variable, Naming your variables properly
- name, substitute for value / A variable name is just a substitute for a value
- creating / Creating a variable and seeing how it works
- working / Creating a variable and seeing how it works
- declaration / Declaration
- assignment / Assignment
- naming conventions / Beginning variable names with lowercase
- declaring / Declaring a variable and its type
- type / Declaring a variable and its type
- built-in variable types / The most common built-in variable types
- declaring, while value assignment / Assigning values while declaring a variable
- declaring, places / Where you declare a variable is important
- scope, determining / Variable scope – determining where a variable can be used
- variables
- changing / Changing variables
- public variables, using / Watching for a possible gotcha when using public variables
- Vector3
- views
- about / Views
- view UI, constructing / Constructing the view UI – how to keep things clean
- target screen resolution / Target screen resolution
- events, recognizing / Recognizing events
W
- while loop
- about / The while loop
- versus for loops / while versus for loops