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

This class handles vehicle's sound : motor sound and crash sound More...

Inheritance diagram for MoreMountains.HighroadEngine.SolidSoundBehaviour:
MoreMountains.HighroadEngine.SolidBehaviourExtender

Public Member Functions

override void Initialization ()
 Use this method to initialize objects in subclasses More...
 
override void Update ()
 Update this method in subclasses More...
 
override void OnVehicleCollisionEnter (Collision other)
 Use this method to describe what happens when the vehicle collides with something More...
 
- Public Member Functions inherited from MoreMountains.HighroadEngine.SolidBehaviourExtender
virtual void Start ()
 Controller's initialization More...
 

Public Attributes

AudioClip EngineSound
 
AudioClip CrashSound
 
float EngineVolume = 0.5f
 Sound volume of the engine. More...
 
float MinimalCrashSpeed = 2.0f
 No crash sound when vehicule is below this speed. More...
 
float EngineMaxPitch = 5.5f
 Maximum pitch value for the engine sound. More...
 
float SpeedFactor = 0.1f
 Speed is multiplied by this factor when calculating engine sound pitch value. More...
 

Protected Attributes

SoundManager _soundManager
 
AudioSource _engineSound
 
float _engineSoundPitch
 
- Protected Attributes inherited from MoreMountains.HighroadEngine.SolidBehaviourExtender
SolidController _controller
 

Detailed Description

This class handles vehicle's sound : motor sound and crash sound

Member Function Documentation

◆ Initialization()

override void MoreMountains.HighroadEngine.SolidSoundBehaviour.Initialization ( )
virtual

Use this method to initialize objects in subclasses

Reimplemented from MoreMountains.HighroadEngine.SolidBehaviourExtender.

◆ OnVehicleCollisionEnter()

override void MoreMountains.HighroadEngine.SolidSoundBehaviour.OnVehicleCollisionEnter ( Collision  other)
virtual

Use this method to describe what happens when the vehicle collides with something

Parameters
tagObjet en collision

Reimplemented from MoreMountains.HighroadEngine.SolidBehaviourExtender.

◆ Update()

override void MoreMountains.HighroadEngine.SolidSoundBehaviour.Update ( )
virtual

Update this method in subclasses

Implements MoreMountains.HighroadEngine.SolidBehaviourExtender.

Member Data Documentation

◆ _engineSound

AudioSource MoreMountains.HighroadEngine.SolidSoundBehaviour._engineSound
protected

◆ _engineSoundPitch

float MoreMountains.HighroadEngine.SolidSoundBehaviour._engineSoundPitch
protected

◆ _soundManager

SoundManager MoreMountains.HighroadEngine.SolidSoundBehaviour._soundManager
protected

◆ CrashSound

AudioClip MoreMountains.HighroadEngine.SolidSoundBehaviour.CrashSound

◆ EngineMaxPitch

float MoreMountains.HighroadEngine.SolidSoundBehaviour.EngineMaxPitch = 5.5f

Maximum pitch value for the engine sound.

◆ EngineSound

AudioClip MoreMountains.HighroadEngine.SolidSoundBehaviour.EngineSound

◆ EngineVolume

float MoreMountains.HighroadEngine.SolidSoundBehaviour.EngineVolume = 0.5f

Sound volume of the engine.

◆ MinimalCrashSpeed

float MoreMountains.HighroadEngine.SolidSoundBehaviour.MinimalCrashSpeed = 2.0f

No crash sound when vehicule is below this speed.

◆ SpeedFactor

float MoreMountains.HighroadEngine.SolidSoundBehaviour.SpeedFactor = 0.1f

Speed is multiplied by this factor when calculating engine sound pitch value.


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