SanAndreasUnity
SanAndreasUnity copied to clipboard
Implement bikes
Bike is a special type of vehicle.
They need separate game logic:
- they have 2 wheels
- their entering/exiting/sitting animations are different
- drive-by is different
- steering left/right means leaning bike to a side
- they can't go in reverse, but instead have to be "pushed" back
Implementation details:
- add new class
Bike
which inheritsVehicle
class - this class is added to Vehicle game object, only if it is a bike
- override methods from
Vehicle
class to apply special behavior