-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudioManager.cs
More file actions
73 lines (50 loc) · 1.6 KB
/
AudioManager.cs
File metadata and controls
73 lines (50 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Media;
namespace RTS_Engine;
public class AudioManager
{
public static SoundEffect MissionTheme = AssetManager.MissionTheme;
public static SoundEffect BaseTheme = AssetManager.BaseTheme;
public static SoundEffectInstance MissionThemeInstance = MissionTheme.CreateInstance();
public static SoundEffectInstance BaseThemeInstance = BaseTheme.CreateInstance();
public static SoundEffectInstance CurrentlyPlayedTheme = null;
public AudioManager()
{
}
// public static SoundEffect RandomSound(List<SoundEffect> sounds)
// {
// Random random = new Random();
// int index = random.Next(sounds.Count);
// return sounds[index];
// }
public static void Apply3D()
{
}
public static void PlayMissionTheme()
{
MissionThemeInstance.IsLooped = true;
MissionThemeInstance.Play();
}
public static void StopMissionTheme()
{
MissionThemeInstance.Stop();
}
public static void PlayBaseTheme()
{
BaseThemeInstance.IsLooped = true;
BaseThemeInstance.Play();
}
public static void StopBaseTheme()
{
BaseThemeInstance.Stop();
}
//TODO: Zmiana muzyki w tle w zaleznosci od sceny (tytul, glosnosc)
public static void PlaySoundtrack()
{
}
}