It is a 4 player asymmetrical game with 2 teams: The Commons who's goal it is to create happiness and the Big Business who's goal it is to earn money. The game has 3 stages and with stage both teams receive a power up.
|2||Can clean up trash||Dash (faster)|
|3||Planting autofeeders||Can carry 2 items|
Like the goals and power ups, the score system is also asymmetric. The Player can compare those. The Big Business earn more money on short-term while The Common earn more points in the long-run. At the last stage, The Commons can plant auto feeders. When they plant those auto feeders close to the city, the inhabitants can provide for themselves. This is the part what explains what the circular economy is and why it will work in the long-run.
There are 4 players that control their car with a XBox One controller. I don't really like to have to check in every class which player is pressing the button, so I created an Input Class that is between the input class of Unity and all other components that need to know the input of the user. The idea of the input class is that you can set it to listen to a single controller and add it to the car as a component. Other components who need to know inputs (like driving) just refer to that component.
The game is more like an inventory system. The problem is that there are so many exceptions like some items can be brought to place A, but only when in stage x, by a player of team 1. To make this all possible and still have a generic system, I started to work with Interfaces. I forced that every item contains a CanPickUp method. When a player tries to pick up, the item itself tells if it is possible. There is also a IItemBevavoir. It almost works like the Unity behaviour. You can add it like a normal component, but I added some calls like onPickUp and OnDrop. Thanks to this system, I could easily create behaviours like expire (when object turns to trash on the ground).