This week I was introduced to the package manager and installed a package called Cinemachine which would allow the camera to follow Ruby around the game. I created a new game object by adding a 2D camera from Cinemachine. The new camera view made some of the area around the game scene visible so I had to paint more of the tilemap, with water along the borders to make it look like an island. I applied Ruby to the "follow" section of the Cinemachine virtual camera in the inspector which made Ruby the centre of the screen as the camera follows her. I added the Cinemachine confiner to my virtual camera to prevent the camera from showing the area outside of the game scene.
In the second set of tutorials, I learned how to add a smoke effect to the robot. I created a new particle system and activated the texture sheet animation in the inspector then changed the mode to sprites. I added the two smoke effects in the spaces below it. I edited the start frame in the texture sheet animation, the angle and radius in the the shape section, and the start lifetime, start size, start speed in the particle system's main section to make the smoke look slightly more natural. I also adjusted the colour in the colour over lifetime section and the size curve in the size over lifetime section to allow the smoke to fade out. I applied the smoke effect to the robot's head and edited the code in the enemy controller script so that the smoke stops when Ruby fixes the robot.
Comments
Post a Comment