LA: To program in C# on Unity.
LO1: Be able to C# code in unity.
LO2: Develop our programming skills.
Intent: Learn programing fundamentals and be able to prototype our projects.
Implementation: C# and Unity.
Impact: Learning the programming fundamentals.
Soft skills: Communication, Navigation.
Industry: Game programmer, software designer, game testing.
English & Math: Programming, decibel math, SPAG
Bools
Bools are yes or no functions, so if you want to check if something is ready, this is where you would use the bool.
Turning off a gameobject
Unlike spawning an object for this, the object will already be in the level, and you simply want to make it visible and enabled, and the opposite through these lines of code.
Debugging
When you want to check is some code is working you can put in a debug.log which will print a message into the editor for example this will print 'This' when called.
This should be the first step in problem solving code.
Spawning an object
While making a game, you might want to spawn an object into the level. This could be an enemy, a pickup or just a piece of a puzzle.
Coroutine
For when you want something to happen after a certain amount of time, rather than every frame in update, you can use a coroutine. This is where you can make something happen after a certain amount of time.
Collision and trigger
If we want something to happen when things collide, for example, a bullet and an enemy, we will be using these functions.
The only difference is that a trigger is something you enter (a pressure plate) and a collision is something you hit (bullet).
Input (keyboard)
If you want something to happen when a key is pressed, you can set it up with this key press.