Variables! (Game Dev Day 6)

Jack Leavey
Jul 17, 2021

--

In Unity, a variable is just a method of storing important game information in code. This could be someone’s speed, an object’s size, the time of day, etc.

A speed variable being utilized.

In my current work, variables are setting the player’s movement speed, as well as the movement speed of the lasers the player fires. Variables also limit the player’s fire rate.

Variables Utilized right now.

So what does this mean in our prototype?

We can now shoot laser that will travel up the screen!

Player character firing “lasers”.

Next we will need to make some enemies so we have something to shoot at.

--

--

Jack Leavey
Jack Leavey

Written by Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!

No responses yet