Click or drag to resize
SoundEffect Class
A sound effect you can attach to a GameObject and constantly play or play on demand.
Inheritance Hierarchy

Namespace:  GeonBit.ECS.Components.Sound
Assembly:  GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class SoundEffect : BaseComponent

The SoundEffect type exposes the following members.

Constructors
  NameDescription
Public methodSoundEffect(SoundEffect)
Create the Sound Effect component.
Public methodSoundEffect(String)
Create the Sound Effect component.
Top
Properties
  NameDescription
Public property_GameObject
Get the game object this component is attached to.
(Inherited from BaseComponent.)
Public propertyDuration
Get sound duration.
Public propertyEnabled
Is this component currently enabled.
(Inherited from BaseComponent.)
Public propertyIsLooped
If true will play this sound in a loop.
Public propertyIsPaused
Is the sound currently paused?
Public propertyIsPlaying
Is the sound currently playing?
Public propertyIsStopped
Is the sound currently stopped?
Public propertyName
Get / set the name of this component.
(Inherited from IComponent.)
Public propertyPan
Pan effect.
Public propertyPitch
Pitch effect.
Public propertyVolume
Sound effect volume.
Top
Methods
  NameDescription
Public methodClone
Clone this sound effect.
(Overrides BaseComponentClone.)
Public methodCollisionEnd
Called when this physical body stop colliding with another body.
(Inherited from BaseComponent.)
Public methodCollisionProcess
Called while this physical body is colliding with another body.
(Inherited from BaseComponent.)
Public methodCollisionStart
Called when this physical body start colliding with another body.
(Inherited from BaseComponent.)
Public methodDestroy
Destroy this component.
(Inherited from BaseComponent.)
Public methodEnable3D
Enable 3d sound effects with emitter and listeners.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFixedUpdate
Just like Update(), but called every constant amount of time regardless of FPS and Vsync.
(Inherited from BaseComponent.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImplementedFrameBasedEvents
Get a list of frame-based events this component implements.
(Inherited from BaseComponent.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasMethodImplemented
Return if this component has a method implemented.
(Inherited from BaseComponent.)
Public methodHeartbeat
An event that triggers every X miliseconds (defined per GameObject instance).
(Inherited from BaseComponent.)
Public methodPause
Pause the sound effect.
Public methodPlay
Play the sound effect.
Public methodRemoveFromParent
Remove this component from parent.
(Inherited from BaseComponent.)
Public methodSendMessage
Send message to this component.
(Inherited from BaseComponent.)
Public methodStop
Stop the sound effect.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Update this component (called every frame parent is active).
(Inherited from BaseComponent.)
Top
Fields
  NameDescription
Public fieldAsDebug
If true, it means this component was added to its parent in debug mode.
(Inherited from BaseComponent.)
Public fieldStatic memberDefaultListener
A default listener to use for 3D sound effects that have no listener and don't use the camera as default.
Public fieldStatic memberDefaultListenerForward
Default 'Forward' vector to use for 3D sound effect listeners.
Public fieldStatic memberDefaultListenerUp
Default 'Up' vector to use for 3D sound effect listeners.
Public fieldDistanceFadeFactor
If a listener object is set, this factor will determine how much the volume will decrease per distance unit.
Public fieldListener
Optional Game Object you can set as the "listener" source for 3d sounds. If set, will decrease volume as the distance grows between this sound effect and the object.
Public fieldPlayOnSpawn
If true, will play this sound effect immediately on spawn event.
Public fieldUseCameraAsListener
If true, 'Listener' object will always be the currently active camera.
Top
See Also