Highroad Engine v1.3
Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.HighroadEngine.CarBehaviour Class Reference

Car behaviour class. Manages car behaviour in the race. This class is in charge of the particles emitted by the car, the smoke, sounds and moving parts. It depends on a CarController class to get data like speed or steering info More...

Inheritance diagram for MoreMountains.HighroadEngine.CarBehaviour:

Public Attributes

float MaximumWheelSteeringAngle = 30f
 
float MaximumCarBodyRollAngle = 12f
 
float StartsLeavingSkidmarksAt = 0.8f
 
bool EmitRocksOnlyOffRoad = false
 
float StartsEmittingRocksAt = 0.6f
 
float SmokesMultiplier = 2f
 
ParticleSystem SmokeLeft
 
ParticleSystem SmokeRight
 
ParticleSystem RocksLeft
 
ParticleSystem RocksRight
 
GameObject FrontRightWheel
 
GameObject FrontLeftWheel
 
GameObject BackRightWheel
 
GameObject BackLeftWheel
 
GameObject CarBody
 
AudioClip EngineSound
 
AudioClip CrashSound
 
int MinimalCrashSpeed = 2
 

Protected Member Functions

virtual void Start ()
 Initializes components More...
 
virtual void Update ()
 On Update, we make our car's body roll, turn its wheels and handle effects More...
 
virtual void ManageSounds ()
 Manages the sounds. More...
 
virtual void CarBodyRoll ()
 Manages the car's body roll More...
 
virtual void SmokeControl ()
 Controls the smoke effets More...
 
virtual void TurnWheels ()
 Turns the wheels. More...
 
virtual void SkidMarks ()
 Handles skid marks when the vehicle is steering enough More...
 
virtual void EmitRocks ()
 Rocks emission More...
 
virtual void OnCollisionEnter (Collision collision)
 Used to play crash sound when colliding More...
 
virtual void OnDestroy ()
 We remove the engine sound at the end of the game. More...
 

Protected Attributes

float _smokeAngle
 
float _smokeStartSize
 
ParticleSystem.ShapeModule _leftSmokeShape
 
ParticleSystem.ShapeModule _rightSmokeShape
 
GameObject _skidmarksLeft
 
GameObject _skidmarksRight
 
ParticleSystem.EmissionModule _smokeLeftEmission
 
ParticleSystem.EmissionModule _smokeRightEmission
 
ParticleSystem.EmissionModule _rocksLeftEmission
 
ParticleSystem.EmissionModule _rocksRightEmission
 
SoundManager _soundManager
 
AudioSource _engineSound
 
float _engineSoundPitch
 
float _steeringBodyRollValue
 
CarController _carController
 

Detailed Description

Car behaviour class. Manages car behaviour in the race. This class is in charge of the particles emitted by the car, the smoke, sounds and moving parts. It depends on a CarController class to get data like speed or steering info

Member Function Documentation

◆ CarBodyRoll()

virtual void MoreMountains.HighroadEngine.CarBehaviour.CarBodyRoll ( )
protectedvirtual

Manages the car's body roll

◆ EmitRocks()

virtual void MoreMountains.HighroadEngine.CarBehaviour.EmitRocks ( )
protectedvirtual

Rocks emission

◆ ManageSounds()

virtual void MoreMountains.HighroadEngine.CarBehaviour.ManageSounds ( )
protectedvirtual

Manages the sounds.

◆ OnCollisionEnter()

virtual void MoreMountains.HighroadEngine.CarBehaviour.OnCollisionEnter ( Collision  collision)
protectedvirtual

Used to play crash sound when colliding

Parameters
otherOther.

◆ OnDestroy()

virtual void MoreMountains.HighroadEngine.CarBehaviour.OnDestroy ( )
protectedvirtual

We remove the engine sound at the end of the game.

◆ SkidMarks()

virtual void MoreMountains.HighroadEngine.CarBehaviour.SkidMarks ( )
protectedvirtual

Handles skid marks when the vehicle is steering enough

◆ SmokeControl()

virtual void MoreMountains.HighroadEngine.CarBehaviour.SmokeControl ( )
protectedvirtual

Controls the smoke effets

◆ Start()

virtual void MoreMountains.HighroadEngine.CarBehaviour.Start ( )
protectedvirtual

Initializes components

◆ TurnWheels()

virtual void MoreMountains.HighroadEngine.CarBehaviour.TurnWheels ( )
protectedvirtual

Turns the wheels.

◆ Update()

virtual void MoreMountains.HighroadEngine.CarBehaviour.Update ( )
protectedvirtual

On Update, we make our car's body roll, turn its wheels and handle effects

Member Data Documentation

◆ _carController

CarController MoreMountains.HighroadEngine.CarBehaviour._carController
protected

◆ _engineSound

AudioSource MoreMountains.HighroadEngine.CarBehaviour._engineSound
protected

◆ _engineSoundPitch

float MoreMountains.HighroadEngine.CarBehaviour._engineSoundPitch
protected

◆ _leftSmokeShape

ParticleSystem.ShapeModule MoreMountains.HighroadEngine.CarBehaviour._leftSmokeShape
protected

◆ _rightSmokeShape

ParticleSystem.ShapeModule MoreMountains.HighroadEngine.CarBehaviour._rightSmokeShape
protected

◆ _rocksLeftEmission

ParticleSystem.EmissionModule MoreMountains.HighroadEngine.CarBehaviour._rocksLeftEmission
protected

◆ _rocksRightEmission

ParticleSystem.EmissionModule MoreMountains.HighroadEngine.CarBehaviour._rocksRightEmission
protected

◆ _skidmarksLeft

GameObject MoreMountains.HighroadEngine.CarBehaviour._skidmarksLeft
protected

◆ _skidmarksRight

GameObject MoreMountains.HighroadEngine.CarBehaviour._skidmarksRight
protected

◆ _smokeAngle

float MoreMountains.HighroadEngine.CarBehaviour._smokeAngle
protected

◆ _smokeLeftEmission

ParticleSystem.EmissionModule MoreMountains.HighroadEngine.CarBehaviour._smokeLeftEmission
protected

◆ _smokeRightEmission

ParticleSystem.EmissionModule MoreMountains.HighroadEngine.CarBehaviour._smokeRightEmission
protected

◆ _smokeStartSize

float MoreMountains.HighroadEngine.CarBehaviour._smokeStartSize
protected

◆ _soundManager

SoundManager MoreMountains.HighroadEngine.CarBehaviour._soundManager
protected

◆ _steeringBodyRollValue

float MoreMountains.HighroadEngine.CarBehaviour._steeringBodyRollValue
protected

◆ BackLeftWheel

GameObject MoreMountains.HighroadEngine.CarBehaviour.BackLeftWheel

◆ BackRightWheel

GameObject MoreMountains.HighroadEngine.CarBehaviour.BackRightWheel

◆ CarBody

GameObject MoreMountains.HighroadEngine.CarBehaviour.CarBody

◆ CrashSound

AudioClip MoreMountains.HighroadEngine.CarBehaviour.CrashSound

◆ EmitRocksOnlyOffRoad

bool MoreMountains.HighroadEngine.CarBehaviour.EmitRocksOnlyOffRoad = false

◆ EngineSound

AudioClip MoreMountains.HighroadEngine.CarBehaviour.EngineSound

◆ FrontLeftWheel

GameObject MoreMountains.HighroadEngine.CarBehaviour.FrontLeftWheel

◆ FrontRightWheel

GameObject MoreMountains.HighroadEngine.CarBehaviour.FrontRightWheel

◆ MaximumCarBodyRollAngle

float MoreMountains.HighroadEngine.CarBehaviour.MaximumCarBodyRollAngle = 12f

◆ MaximumWheelSteeringAngle

float MoreMountains.HighroadEngine.CarBehaviour.MaximumWheelSteeringAngle = 30f

◆ MinimalCrashSpeed

int MoreMountains.HighroadEngine.CarBehaviour.MinimalCrashSpeed = 2

◆ RocksLeft

ParticleSystem MoreMountains.HighroadEngine.CarBehaviour.RocksLeft

◆ RocksRight

ParticleSystem MoreMountains.HighroadEngine.CarBehaviour.RocksRight

◆ SmokeLeft

ParticleSystem MoreMountains.HighroadEngine.CarBehaviour.SmokeLeft

◆ SmokeRight

ParticleSystem MoreMountains.HighroadEngine.CarBehaviour.SmokeRight

◆ SmokesMultiplier

float MoreMountains.HighroadEngine.CarBehaviour.SmokesMultiplier = 2f

◆ StartsEmittingRocksAt

float MoreMountains.HighroadEngine.CarBehaviour.StartsEmittingRocksAt = 0.6f

◆ StartsLeavingSkidmarksAt

float MoreMountains.HighroadEngine.CarBehaviour.StartsLeavingSkidmarksAt = 0.8f

The documentation for this class was generated from the following file: