コード例 #1
0
        public PlayerEngineSound()
        {
            AEM = AudioEngineManager.GetInstance();
            previousVelocity = 0;

            currentSound = AEM.soundBank.GetCue("subengine");
        }
コード例 #2
0
        public PlayerEngineSound()
        {
            AEM = AudioEngineManager.GetInstance();
            previousVelocity = 0;

            currentSound = AEM.soundBank.GetCue("subengine");
        }
コード例 #3
0
 public static AudioEngineManager GetInstance()
 {
     if (instance == null)
     {
         instance = new AudioEngineManager();
     }
     return(instance);
 }
コード例 #4
0
        //Only one listener, several emitters
        //Store emitters in a list?
        //Store listener as a single variable in the class
        //Update receives emitters current position and velocity
        //

        public EnvironmentSoundManager(Vector3 position, Vector3 velocity)
        {
            player          = new AudioListener();
            player.Position = position;
            player.Velocity = velocity;

            environmentSounds = new List <CueEmitter>();

            AEM = AudioEngineManager.GetInstance();
        }
コード例 #5
0
        //Only one listener, several emitters
        //Store emitters in a list?
        //Store listener as a single variable in the class
        //Update receives emitters current position and velocity
        //
        public EnvironmentSoundManager(Vector3 position, Vector3 velocity)
        {
            player = new AudioListener();
            player.Position = position;
            player.Velocity = velocity;

            environmentSounds = new List<CueEmitter>();

            AEM = AudioEngineManager.GetInstance();
        }
コード例 #6
0
        //Only one listener, several emitters
        //Store emitters in a list?
        //Store listener as a single variable in the class
        //Update receives emitters current position and velocity
        //
        public OpponentEngineSoundManager(Vector3 position, Vector3 velocity)
        {
            player = new AudioListener();
            player.Position = position;
            player.Velocity = velocity;

            opponentEngines = new Dictionary<string, MovingCueEmitter>();

            AEM = AudioEngineManager.GetInstance();
        }
コード例 #7
0
        //Only one listener, several emitters
        //Store emitters in a list?
        //Store listener as a single variable in the class
        //Update receives emitters current position and velocity
        //

        public OpponentEngineSoundManager(Vector3 position, Vector3 velocity)
        {
            player          = new AudioListener();
            player.Position = position;
            player.Velocity = velocity;

            opponentEngines = new Dictionary <string, MovingCueEmitter>();

            AEM = AudioEngineManager.GetInstance();
        }
コード例 #8
0
        //Store cues in a list
        //Can stop all sounds
        public LoopSoundManager()
        {
            playedSounds = new List<Cue>();

            AEM = AudioEngineManager.GetInstance();
        }
コード例 #9
0
        //Store cues in a list
        //Can stop all sounds
        public LoopSoundManager()
        {
            playedSounds = new List <Cue>();

            AEM = AudioEngineManager.GetInstance();
        }
コード例 #10
0
 /// <summary>
 /// Plays a single sound once
 /// </summary>
 /// <param name="cueName">The sound to be played</param>
 public static void PlaySound(string cueName)
 {
     AudioEngineManager.GetInstance().soundBank.PlayCue(cueName);
 }
コード例 #11
0
 public static AudioEngineManager GetInstance()
 {
     if (instance == null) instance = new AudioEngineManager();
     return instance;
 }