Yesterday and today I worked on two related stuff: "dying" and fading.
You don't really die in this game. The character has a fear level (which is not visible yet, but I'm thinking on how to notify the player about how much fear does the character have), which increases when a shade passes through or near the player, but slowly decreases over time. If it reaches its max value, the character "wakes up" into the same level, which effectively restarts it.
To make this a little more aesthetically pleasing, I've added a fade in / fade out effect to the beginning and the end of a level. This was done by the new Canvas object - I have a prefab of a canvas containing a single black Image that covers the whole screen, and I change its alpha. For a tutorial, click here. Note: after the player dies, the controller script is turned off, so it can't move while fading out.
(Gif in full post)
Also, I've found a pretty quick way of "dying":

No comments:
Post a Comment