My first Unity project!

This is a 2D platformer minigame starring a cute pink alien (art: www.kenney.nl). It has a main menu, a game level that requires the player to collect a minimum number of objects, and three more levels with a simple quest mechanism.





There are 3 singleton scripts: GameController, InterfaceController and SoundController.


The main menu allows you to start the game, quit or go to submenus. You can go back to the main menu from the game using the Esc key.


There's a Level Selector submenu.


The options sub-menu uses Player prefs to save sound preferences.


The alien has a collider in the lower part of the sprite to detect collisions with the ground (using tags) to reset the jump counter. You can only jump twice before touching the ground. The collider also kills dynamic enemies when jumping. 
There is a kill zone in the lower part of the scene that sends the player back to the beginning.


There are various pickup objects: cherry, lollipop, heart and mushroom. They all have a simple method with a random int and a switch to play a "random" sound.
There are two types of dynamic enemies, the bat and the bee. They use a collider to flip the sprite and an Enum for movement direction.


The snail and the green blocker are static enemies.


You can win level 1 if you get to the cupcake object with a minimum number of collectables.


Level 2 to 4 have a yellow NPC assigning a mission.




Once collected the red gem, the blue key or the sword and a minimum number of collectables you can go back to the NPC. It will let you win. If you collide again with the NPC without the object, he gets a bit angry and reminds you to focus on the quest.