Day 15- 11/11/20

Dylan Murayama
2 min readNov 12, 2020

Happy Veteran’s Day everyone! Today has been quite the day. I worked solely on my boss enemy today and have gotten it pretty much finished at this point. I had to, unfortunately, redo a lot of things because of not realizing how a coroutine worked properly. And kept getting my coroutine related to my bosses movement called over and over. The ironic thing is that in our pm meeting, this was brought up which I thought was hilarious because I had spent a few hours of the day figuring out what went wrong and it wasn’t until 10 minutes before the meeting I learned how to properly call coroutines so they are called only once. Anyways, all that time digging through the code and analyzing was not wasted because this is something I will remember for the rest of my coding career. In short, if you are learning coroutines, remember to use a bool, so your coroutine is only called once instead of 60 times per second.

As for my Boss, I had started the day with the movement and laser mostly done. I wanted to clean up the boss movement by adding an entrance sequence at the start and after it charges, so it doesn’t look like it appears out of nowhere. This is where I ran into my coroutine problems. Nevertheless, I was able to solve the problem with a simple if and bool. My boss movement is now where I had envisioned and I am very happy with it.

The lasers, were a little bit of a nightmare as well, as the sprite I am using was set horizontally instead of vertically. After a little bit of toying around and googling, the easy fix I am using is to create a parent object that holds the sprites in the proper position. This way when I instantiate and shoot the lasers they are not shooting sideways.

The beam was another fun challenge as instead of instantiating I set the beam to active since I wanted the beam to follow the Boss. I have not had a whole lot of practice with this but turned out to be much easier than expected. The tough part of this was getting my beam to scale properly, but once again after some googling and digging, an easy solution to this is to set a parent object and change one of the positions of the child so the pivot of the parent is now on the edge of the child object. Now the object should grow in the desired direction.

All-in-all, a very good day, and I am planning on moving on to the wave manager now. and hopefully, do some fine-tuning later in the day.

--

--