I am Angela Jones-Wright. I am wanting to find work in the Unity platform career. I got my Game Design B. S. degree from Full Sail University Online. Then I have gotten my master’s degree from Full Sail University for Entrepreneurship and Innovation. Both I enjoyed doing. However, I could not find work in the field I wanted to work in and my skill set would match.
While this was not helping, my health took a nosedive and I found that I had to pull back and go through the tests that the doctors had requested. I was…
Understanding how we created this script.
In part one, we added the PowerUp Script to our Speed Boost Prefab. We need to open that up and we are going to create a private int. This is how it should look like when you are done.
private int powerupID;
Then you may need to put a note below using /* Then placing the correlating numbers and what it is. Like TripleShot = 0, SpeedBoost = 2; and Shields = 3. Then remember to close it off with */.
Now you will need to go to the OnTriggerEnter2d. Now, there is…
I am going to break up this into a few more parts so that we can understand what I am doing to create this game.
First, we are going to look into our sprite's power-up folder and select the speed boost sprite. Take the first power-up sprite and put it into the hierarchy. Then size it by using X and Y settings and match them to the X and Y settings to the player. I used 0.5 and 0.5.
Then you will need to go and change the settings from background to foreground in the Inspector window. This will allow…
While each of the power up should work for a short time, how should we decide? The old way was to guess and let it run and go back into the code and change it for there? Or is there a way to change inside the inspector window and tweak it until it looks right?
Why, yes I say there is a way. By using the [SerializeField], allows you to code to connect to the inspector window. By using the code that controls the object that is needed, you can also use it for the spawner.
Then you can tinker by putting in a new time of number until you find the right one.
So that is how I figured out the length of time a power up should last.
While animation is easy with the sprites, today we will look at the animation. To start to create your animation by clinking on Window on the menu at the top of the screne. Below I am animating the enemy ship so that we can make it explode.
While the bottom bit of the screen has the animator has it, we need to go to the sprites and height light the explosion ones into the scene. Then you will need to record it by click on the red record button and then hit play.
Now we have started to get our game looking like a game. I have added the 2D Sprites to the game’s player, enemy, and the background.
All we had to do was change the rigidbody to 2D Rigidbody and 2D box colliders. For the enemy script we had to change the OnTriggerEnter(Collider other) to OnTriggerEnter2D(Collider2d other) and volia we have ships, we have firing ship and enemies. Now we need to make collectable helps to help us defeat our enemies.
NEXT TIME: How to create animated sprites and more.
While most people who create objects to move around, don’t start with a fully completed peice of work. They use objects for stand in. And in this project, we are using boxes and capsules to create a working game. While building it, Testing it out and see if it is correct is a major way to get it up and runing to where we need to be.
To the right is a shot of enemy boxes are representative of red and the white is the player. But how do we know this and this is not art is it? Well…
Spawning objects like they are falling without using the power of tons of if else statements calls for a Spawn Manager. What is a spawn manager? It is a bunch of code using the IEnumerator method and private void. You can create a container to hold enemies and they will spawn random without messing with long handle codes of telling them to pop up in certain spots.
We use coroutines so that they help us keep up with how many objects can spawn and how few that they will allow through each spawning point.
Hi all. Now I mentioned that I would do an article on what is a G.D.D? Well, it is a document that outlines the game and how the game's features should work. While it is not necessary, it gives large games an idea of how the game should look like, and a record of what has changed during the creation of the game. So I am going to show you what a blank outline looks like.
This is the top page. It has the studio name and who worked on the project. …
Happy Memorial Day! While today is a holiday, my goal today is to finish up a few posts. So today, I am going to speak to you about Coroutines in Unity.
Now if you use an if statement over and over, it becomes long and tedious. What if you can shorten it down to another block and text. Why not try IEnumerator? And what is IEnumerator do and how to use it?
IEnumerator is a function that allows you to call a long list of stuff and turn it off and on.
So to start with you will need to…