Beispiel #1
0
 public Scene(SceneType type, string[] text, CharacterArgs[] characterConfig,
              BackgroundArgs backConfig, AudioArgs audioConfig)
 {
     Type             = type; Text = text;
     CharactersConfig = characterConfig; BackgroundConfig = backConfig;
     AudioConfig      = audioConfig;
 }
Beispiel #2
0
        void StartPlayAudio(AudioArgs args)
        {
            if (!AudioPlayers.ContainsKey(args.Audio))
            {
                AudioPlayers.Add(args.Audio, new WaveOut());
            }
            else
            {
                return;
            }
            WaveFileReader reader  = new WaveFileReader(Audio[args.Audio]);
            LoopStream     wavSong = new LoopStream(reader);

            wavSong.EnableLooping    = args.Loop;
            AudioPlayers[args.Audio] = new WaveOut();
            AudioPlayers[args.Audio].Init(wavSong);
            AudioPlayers[args.Audio].Play();
        }