Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    AudioListenerComponent Class

    Namespace: Stride.Engine
    Assembly: Stride.Engine.dll

    Component representing an audio listener.

    System.Object → EntityComponent → ActivableEntityComponent → AudioListenerComponent
    Derived from AudioListenerComponent:

    [Display("Audio listener", null, Expand = ExpandRule.Once)]
    [DataContract("AudioListenerComponent")]
    [DefaultEntityComponentProcessor(typeof(AudioListenerProcessor), ExecutionMode = ExecutionMode.Runtime)]
    [ComponentOrder(6000)]
    [ComponentCategory("Audio")]
    public sealed class AudioListenerComponent : ActivableEntityComponent, IIdentifiable
    Remarks

    Associate this component to an Entity to simulate a physical listener listening to the AudioEmitterComponents of the scene, placed at the entity's center and oriented along the entity's Oz (forward) and Oy (up) vectors.

    Use the AudioSytem's Stride.Audio.AudioSystem.AddListener(Stride.Engine.AudioListenerComponent) and Stride.Audio.AudioSystem.RemoveListener(Stride.Engine.AudioListenerComponent) functions to activate/deactivate the listeners that are actually listening at a given time.

    The entity needs to be added to the Entity System so that the associated AudioListenerComponent can be processed.


    Inherited Members

    ActivableEntityComponent.Enabled
    EntityComponent.Entity
    EntityComponent.Id
    EntityComponent.EnsureEntity

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation